I’m trying to understand and make changes to SQL’s Lezer grammar but it isn’t quite doing what I hope yet.
Essentially I’m trying to get it to recognise foldable sections between keywords and not just on the entire statement.
I would like to go from:
+ SELECT name, age
FROM users
WHERE active = 1;
…which collapsed is:
SELECT ...
to:
+ SELECT name, age
+ FROM users
+ WHERE active = 1;
…which collapsed is:
SELECT ... FROM ... WHERE ...
What changes should I look to make?