Question

In Xtext 2.0, ML_COMMENT is defined in org.eclipse.xtext.common.Terminals as hidden.

I want to see comments in my grammar.

How can I undo this?

Was it helpful?

Solution

Just override the hidden statement from the inherited grammar:

grammar org.xtext.example.mydsl.MyDsl 
with org.eclipse.xtext.common.Terminals
hidden(WS, SL_COMMENT)  // <--- Override
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top