|
FE 0.16.1
Fast, Effecient FrontEnds
|
What fe::Parser needs of its Token type: a Tag and a Loc, copied in and out of the lookahead by value. More...
#include <fe/parser.h>
What fe::Parser needs of its Token type: a Tag and a Loc, copied in and out of the lookahead by value.
Parser::accept and Parser::expect indicate failure by returning a default-constructed Token, so Tok() must be falsy and tagged Tag::Nil. That sentinel is only checkable here if Tok() is usable in a constant expression - Parser::init asserts it. The probe for that yields a bool, as MSVC mistypes an enum as the non-type argument of a template.