-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add lines and columns to dust.pegjs #309
Conversation
Adding lines and columns to each significant node in dust.pegjs. The lines and columns are removed by filterAST before compilation begins. This will be useful for more detailed error reporting in applications like https://github.com/smfoote/Swiffer.js
lgtm |
|
||
/*------------------------------------------------------------------------------------------------------------------------------------- | ||
inline_part is defined as matching a special or reference or literal | ||
---------------------------------------------------------------------------------------------------------------------------------------*/ | ||
inline_part | ||
= special / reference / l:literal { return ["buffer", l] } | ||
= special / reference / l:literal { return ["buffer", l].concat([['line', line], ['col', column]]) } | ||
|
||
buffer "buffer" | ||
= e:eol w:ws* | ||
{ return ["format", e, w.join('')] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
@@ -1,5 +1,6 @@ | |||
/nbproject | |||
node_modules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be fine. please revert.
Good to merge otherwise |
I had attempted to change the .gitignore to remove a directory within node_modules/, but it turned out the .gitignore was correct. The directory had been force-added, so I had to remove it, which I did in a separate PR.
Add lines and columns to dust.pegjs
Adding lines and columns to each significant node in dust.pegjs. The lines and columns are removed by filterAST before compilation begins.
This will be useful for more detailed error reporting in applications like https://github.com/smfoote/Swiffer.js