You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current layout preprocessor renders tokens as String to check whether they match layout keywords or { } ;. However, each keyword/symbol token comes with an ID that could be checked faster.
Steps to rewrite layout processor (generator) to use IDs instead of String:
LBNF: check whether { } ; occur in grammar when layout is used.
Give each symbol a name, like ( is LPAREN.
Define token constants in generated lexer for all the keywords and symbols.
Reference these constants in the layouter, rather than strings.