Aaron Digulla
Aaron Digulla

Reputation: 328754

How can I override ML_COMMENT in Xtext?

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?

Upvotes: 2

Views: 1276

Answers (1)

Christian Dietrich
Christian Dietrich

Reputation: 11868

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

Upvotes: 4

Related Questions