TravonteD / tree-sitter-fennel

Treesitter grammar for the Fennel programming language
MIT License
42 stars 9 forks source link

Errors when using non-ascii identifiers in Fennel #30

Closed alexaandru closed 3 years ago

alexaandru commented 3 years ago

To reproduce:

  1. given f.fnl with content (local ⧔ 42)
  2. highlighting is broken
  3. using playground, it reports:
ERROR [0, 0] - [0, 14]
      ERROR [0, 7] - [0, 13]

Fennel itself can compile the above just fine:

$ fennel --compile f.fnl 
local _e2_a7_94 = 42
return nil

so it is valid code.

TravonteD commented 3 years ago

Thanks for the report, I'll work up a patch to get it fixed

alexaandru commented 3 years ago

Many thanks for your work! Cheers! :)

TravonteD commented 3 years ago

I just merged a pretty large re-write, with a fresh install check if you still are getting the parser error

alexaandru commented 3 years ago

I don't know how to test this directly, I was only using it indirectly, via https://github.com/nvim-treesitter/nvim-treesitter plugin. Could you please tell me how can I compile it? Keeps complaining it cannot find <tree_sitter/parser.h>.

I did download tree-sitter itself, and updated INCS to add -I../tree-sitter/lib/include but it still won't compile.

Thank you!

otommod commented 3 years ago

The new parser is now used by nvim-treesitter. You can update the plugin and then :TSUpdate and test.

alexaandru commented 3 years ago

It works, errors are all gone now! :)

Thank you! :)