mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-15 08:18:55 +00:00
added alternative guard conditions for
AntlrContentAssistGrammarGenerator
This commit is contained in:
parent
58e3bba502
commit
6055348451
2 changed files with 3 additions and 1 deletions
|
@ -161,7 +161,7 @@ class AntlrContentAssistGrammarGenerator extends AbstractAntlrGrammarWithActions
|
|||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
«FOR element : elements SEPARATOR '\n|'»«element.ebnf(options, false)»«ENDFOR»
|
||||
«FOR element : elements SEPARATOR '\n|'»«element.findGuardForElement.renderPredicate»«element.ebnf(options, false)»«ENDFOR»
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
|
|
|
@ -432,6 +432,8 @@ public class AntlrContentAssistGrammarGenerator extends AbstractAntlrGrammarWith
|
|||
} else {
|
||||
_builder.appendImmediate("\n|", "\t");
|
||||
}
|
||||
String _renderPredicate = this._hoistingProcessor.findGuardForElement(element).renderPredicate();
|
||||
_builder.append(_renderPredicate, "\t");
|
||||
String _ebnf = this.ebnf(element, options, false);
|
||||
_builder.append(_ebnf, "\t");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue