private void TokeniseJumpNumbers(DetokenisedLineReader reader, TokenisedLineWriter writer) { var word = reader.ReadLineNumber(); if (!string.IsNullOrEmpty(word)) { writer.Write((char)Token.LineNumber); writer.Write(word); } else { reader.Read(); writer.Write('.'); } }
/// <summary> /// Convert an ascii line number to tokenised start-of-line /// </summary> private void TokeniseLineNumber(DetokenisedLineReader reader, TokenisedLineWriter writer) { var lineNumber = reader.ReadLineNumber(); writer.WriteLineNumber(lineNumber); if (!string.IsNullOrEmpty(lineNumber)) { // ignore single whitespace after line number, if any, // unless line number is zero (as does GW) if (reader.Peek() == ' ' && lineNumber != "\0\0") { reader.Read(); } } }