Creates a Lexer.
Decode UTF character. Issue error messages for invalid sequences. Return decoded character, advance p to last character in UTF sequence.
Lex delimited strings: q"(foo(xxx))" // "foo(xxx)" q"[foo(]" // "foo(" q"/foo]/" // "foo]" q"HERE foo HERE" // "foo\n" Input: p is on the "
Parse escape sequence.
Parse doc comment embedded between t->ptr and p. Remove trailing blanks and tabs from lines. Replace all newlines with \n. Remove leading comment character from each line. Decide if it's a lineComment or a blockComment. Append to previous one for this token.
Lex hex strings: x"0A ae 34FE BD"
Read in characters, converting them to real.
Read in a number. If it's an integer, store it in tok.TKutok.Vlong. integers can be decimal, octal or hex Handle the suffixes U, UL, LU, L, etc. If it's double, store it in tok.TKutok.Vdouble.
Look ahead at next token's value.
Look 2 tokens ahead at value.
tk is on the opening (. Look ahead and return token that is past the closing ).
parse: #line linnum filespec also allow __LINE__ for linnum, and __FILE__ for filespec
Turn next token in buffer into a token.
Get postfix of string literal.
Lex delimited strings: q{ foo(xxx) } // " foo(xxx) " q{foo(} // "foo(" q{{foo}"}"} // "{foo}"}"" Input: p is on the q
Combine two document comments into one, separated by a newline.