Skip to content
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

Merged
merged 7 commits into from
Jul 24, 2013

Conversation

smfoote
Copy link
Contributor

@smfoote smfoote commented Jul 17, 2013

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

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
@vybs
Copy link
Contributor

vybs commented Jul 17, 2013

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('')] }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing one?

Copy link
Contributor Author

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
Copy link
Contributor

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.

@jimmyhchan
Copy link
Contributor

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.
jimmyhchan added a commit that referenced this pull request Jul 24, 2013
Add lines and columns to dust.pegjs
@jimmyhchan jimmyhchan merged commit 60d123d into linkedin:master Jul 24, 2013
@smfoote smfoote deleted the lines-and-columns branch February 2, 2015 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants