tree-sitter / tree-sitter-rust

Rust grammar for tree-sitter
MIT License
359 stars 101 forks source link

bug: Doesn't compile on bash #233

Closed yuriv closed 2 months ago

yuriv commented 2 months ago

Did you check existing issues?

Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)

No response

Describe the bug

Doesn't compile on bash. Please, escape the # char in line 41 of the Makefile:

change

41: SONAME_MINOR := $(shell sed -n 's/#define LANGUAGE_VERSION //p' $(PARSER))

to

"41: SONAME_MINOR := $(shell sed -n 's/\#define LANGUAGE_VERSION //p' $(PARSER))"

Steps To Reproduce/Bad Parse Tree

  1. run make on bash

Expected Behavior/Parse Tree

success

Repro

make
ObserverOfTime commented 2 months ago

Can't reproduce.

amaanq commented 2 months ago

Neither can I.

yuriv commented 2 months ago

after make is run i have got the message: Makefile:41: *** unterminated call to function 'shell': missing ')'. Stop.

my shell is $ sh --version GNU bash, version 4.4.20(1)-release (x86_64-redhat-linux-gnu)

The problem is unescaped # char in line 41. Today i met with the same problem in the tree-sitter-c and tree-sitter-cpp parsers too.