sqlfmt
sqlfmt copied to clipboard
Re-think rule sets for lexing rule isolation and re-use
Right now there are two rulesets, main and jinja.
This made some sense when rulesets were MECE, since in this case they were lexing two totally different languages.
However, we might want to drop into more specialized lexing for some complex DDL statements. There is a lot of SQL syntax that is shared (e.g., numbers, names, operators), but we'll want more specific lists of operators and word operators.
e.g., #282 will require a lot of new keywords. How to maintain isolation between select lexing and create function lexing while allowing them to share the parts of the syntax they have in common?
also e.g., #283 we don't want the select in grant select to be lexed like a KW.