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

Inline nested tags support #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jamesbellnet
Copy link

Hi @zealot128, I've had a go at adding support for nested pug syntax (I.e.: div A #[a(href="/link") link] can go here.) as it's one of a few things I've noticed needs sorting whilst using the parser and I saw the TODO at the top of grammar.js. I appreciate this looks like a big pull request, but all I've really done is:

  • Update grammar.js
  • Update test/example.pug
  • Add tests in: test/corpus/inline-nested.txt

Aside from that most of the files were generated on tree-sitter generate. I've noticed however that these files also exist in other treesitter parser repositories that are marked as "complete", so I've committed them and updated the .gitignore to match some of these other "complete" parsers.

From what I can see it seems to be working fine. The tests pass and I can see the highlighting working in the example file locally. Let me know if I've missed anything here or done anything wrong, it's my first attempt at a treesitter parser and I have had a few other minor issues whilst using this one that I intend to fix once I know you're happy with what's been done so far.

@zealot128
Copy link
Owner

Thanks for the work. I enabled tests for your PR.
Can you have a look into the failing tests, if there are something that's expected?

@jamesbellnet
Copy link
Author

Yeah sure. I believe these were failing before I started working on the grammar but I'll have a look into them soon.

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.

2 participants