Expand description
Utility functions for the parser
Functionsยง
- check_
ok_ needed_ outputs - comma_
separate - Splits out a token slice into a vector of token slices, separated by commas.
- find_
matching_ parenthesis - Finds the index of the matching parenthesis in the token slice. This function assumes that the opening parenthesis is not part of the slice.
- gather_
all - Match as many tokens of any kind as possible. Always consumes the entire token slice
- gather_
operands - Given a list of list of types, gather operands whose type together matches any of the variants. Returns the nodes matching the longest variant.