Unexpected token 'propSource'

Hey there,

So I had to extend json grammar file with a small addition, this is the grammar file:

@top JsonText { value }

value { True | False | Null | Number | String | Object | Array | TemplateExpression }

String { string }
Char { char* }
Object { "{" list<Property>? "}" }
Array  { "[" list<value>? "]" }
TemplateExpression  { "{{" Char "}}" }
Property { PropertyName ":" value }
PropertyName { string }


@tokens {
  True  { "true" }
  False { "false" }
  Null  { "null" }

  Number { '-'? int frac? exp?  }
  int  { '0' | $[1-9] std.digit* }
  frac { '.' std.digit+ }
  exp  { $[eE] $[+\-]? std.digit+ }

  string { '"' char* '"' }
  char { $[\u{20}\u{21}\u{23}-\u{5b}\u{5d}-\u{10ffff}] | "\\" esc }
  esc  { $["\\\/bfnrt] | "u" hex hex hex hex }
  hex  { $[0-9a-fA-F] }

  whitespace { $[ \n\r\t] }

  "{" "}" "[" "]"
}

@skip { whitespace }
list<item> { item ("," item)* }

@external propSource jsonHighlighting from "./highlight"

@detectDelim

Didn’t changed anything but adding TemplateExpression.

When running the lezer-generator, I get Unexpected token 'propSource', what am I doing wrong?

Thanks :pray:

I don’t, when I run the file you pasted through lezer-generator.

Weird.

I am using lezer/generator v1.2.3 and node v16.14.0.
Is it the same as yours? @marijn

Same lezer/generator version here.