Lexer.scan

The main method which recognizes the characters that make up a token.

Complicated tokens are scanned in separate methods.

class Lexer
void
scan
()
in { assert (text.ptr <= p && p < end); }
out { assert (text.ptr <= t.start && t.start < end, t.kind.toString); assert (text.ptr <= t.end && t.end <= end, t.kind.toString); assert (t.kind != T!"Invalid", t.text); }

Meta