Don't create action functions for lexer rules with no specified actions

This commit is contained in:
Sam Harwell 2012-11-26 10:53:28 -06:00
parent 90f4452dc4
commit fa5332926b
1 changed files with 4 additions and 0 deletions

View File

@ -305,6 +305,10 @@ public class OutputModelController {
}
public void buildLexerRuleActions(Lexer lexer, final Rule r) {
if (r.actions.isEmpty()) {
return;
}
CodeGenerator gen = delegate.getGenerator();
Grammar g = delegate.getGrammar();
String ctxType = gen.target.getRuleFunctionContextStructName(r);