So I had a grammar file which worked fine and would turn
DECLARE hello INITIALLY "world"
into
[[{"type": "declare","name": "hello","value": {"type": "data","dtype": "string","string": "world"}}]]
However, I decided to move each part into a seperate file and now i get
Error: invalid syntax at line 1 col 1:
DECLARE hello INITIALLY "world"
^
at Lexer._token (D:\projects\unfinished\lang\reflang\node_modules\moo\moo.js:533:13)
at Lexer.next (D:\projects\unfinished\lang\reflang\node_modules\moo\moo.js:480:19)
at Parser.feed (D:\projects\unfinished\lang\reflang\node_modules\nearley\lib\nearley.js:273:30)
at Object.<anonymous> (D:\projects\unfinished\lang\reflang\src\parse.js:9:8)
So I had a grammar file which worked fine and would turn
DECLARE hello INITIALLY "world"
into[[{"type": "declare","name": "hello","value": {"type": "data","dtype": "string","string": "world"}}]]
However, I decided to move each part into a seperate file and now i get
You can see the old grammar here
And this is the new (cut down for just declare) grammar lang.ne
variables.ne
What am I doing wrong?