grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals
generate myDsl "http://www.xtext.org/example/mydsl/MyDsl"
Model:
a = 'STRING';
@Test
def void loadModel() {
val result = parseHelper.parse('''
STRING
''')
Assertions.assertNotNull(result)
println(result.a)
val errors = result.eResource.errors
Assertions.assertTrue(errors.isEmpty, '''Unexpected errors: «errors.join(", ")»''')
}
Steps to reproduce:
Create a new Xtext project with the Xtext new project wizard.
Modify the grammar to
Execute the
GenerateMyDsl.mwe2workflow.Modify the generated loadModel() test case in the MyDslParsingTest.xtend file to
Unexpected errors: XtextSyntaxDiagnostic: null:1 String literal is not properly closed