Jurassic.Compiler.Lexer.ReadLineTerminator C# (CSharp) Method

ReadLineTerminator() private method

Reads a line terminator (a newline).
private ReadLineTerminator ( int firstChar ) : Jurassic.Compiler.Token
firstChar int The first character of the line terminator.
return Jurassic.Compiler.Token
        private Token ReadLineTerminator(int firstChar)
        {
            // Check for a CRLF sequence, if so that counts as one line terminator and not two.
            int c = this.reader.Peek();
            if (firstChar == 0x0D && c == 0x0A)   // CRLF
                ReadNextChar();

            // Increment the internal line number so errors can be tracked properly.
            this.lineNumber++;
            this.columnNumber = 1;

            // Return a line terminator token.
            return new WhiteSpaceToken(1);
        }