-
-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
I'm trying to make a parser for something like this:
// single line comment
let a = 3;
Since ctpg automatically skips whitespaces I use rule like this:
stmt("let", token, "=", expr, ";")
But since "single line comment" can appear anywhere I need to implement all the variations:
stmt("let", comment, token, "=", expr, ";"),
stmt("let", token, comment, "=", expr, ";"),
stmt("let", token, "=", comment, expr, ";"),
...
I ain't doing that...
I tried to make comment optional but parser doesn't recognize empty (zero length) term.
Any ideas or is it simply not supported?
Metadata
Metadata
Assignees
Labels
No labels