eclipse-langium / langium

Next-gen language engineering / DSL framework
https://langium.org/
MIT License
663 stars 61 forks source link

Single quotes in property types are not correctly escaped #1536

Closed msujew closed 2 weeks ago

msujew commented 3 weeks ago

Langium version: 3.0 Package name: langium-cli

Steps To Reproduce

  1. Use a rule like A: value="'test'";
  2. The generated ast.ts does not compile

The current behavior

It generates the string type as ''test''.

The expected behavior

It's supposed to generate the type as '\'test\''.