wenkokke / tree-sitter-talon

Tree Sitter parser for Talon files.
MIT License
8 stars 5 forks source link

Exclude carriage return from comment nodes. #45

Closed wolfmanstout closed 5 months ago

wolfmanstout commented 1 year ago

Fixes #36

wolfmanstout commented 1 year ago

One thing that was surprising (to me) about the Mocha unit tests: I have to run "npm install" twice to reliably rebuild after grammar changes (you can bet I found out the hard way, after nearly tearing my hair out). This is because npm install rebuilds the bindings based on binding.gyp as its first step, before parser.c is regenerated (which is a dependency of the bindings). If someone who is more familiar with npm and/or tree-sitter knows if there's a better way, that would be helpful. Otherwise this might be worth documenting.

wolfmanstout commented 1 year ago

I fixed the aforementioned issue (following tree-sitter-python here).

wenkokke commented 1 year ago

Thanks!

Any reason for choosing Mocha?

wolfmanstout commented 1 year ago

I saw Cursorless uses it 😂

I'm new to Node.js so no strong preference. I see that the most recent version of Node.js released this year has a native lightweight framework we could also use. Not sure if tooling support is as good, and means people would need recent Node to run tests, though.

wenkokke commented 1 year ago

Let's not depend on the latest version.

For now, I'd suggest jest?

wenkokke commented 1 year ago

Paging @pokey: Why Mocha over Jest?

wenkokke commented 1 year ago

Should make a note that if we add a testing framework, we should port the current JS tests to it.

pokey commented 1 year ago

Yeah we'd prob be using jest if it weren't for mocha being default framework for VSCode tests

wolfmanstout commented 1 year ago

No problem, I can switch to Jest. Any reason for the preference? Just curious for my own education.

wenkokke commented 1 year ago
  1. I know how to use it.
  2. It's more widely used.
  3. It's a little simpler.
wolfmanstout commented 1 year ago

Updated to use Jest, ready for review.

wolfmanstout commented 11 months ago

Any questions? Feel free to ping me on Slack.

wenkokke commented 5 months ago

This is now merged. Sorry for the delay!