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?

有帮助吗?

解决方案

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
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top