We have a TokenSet abstraction over here: https://github.com/matklad/libsyntax2/blob/c8cf1d8cdac48f48caf9505bd5dc20dd2b962317/src/parser/event_parser/parser.rs#L70-L92
It is a set of SyntaxKinds, which is used during parsing for error recovery: the idea is to define TokenSets for things like FIRST(item) and then, when an error occurs, skip tokens until a token from this set is encountered.
We have a
TokenSetabstraction over here: https://github.com/matklad/libsyntax2/blob/c8cf1d8cdac48f48caf9505bd5dc20dd2b962317/src/parser/event_parser/parser.rs#L70-L92It is a set of
SyntaxKinds, which is used during parsing for error recovery: the idea is to define TokenSets for things likeFIRST(item)and then, when an error occurs, skip tokens until a token from this set is encountered.TokenSetto a separate file[u64; 4]to represet a bit-set of tokensconst TokenSet