Fix options not getting properly applied to extracted lexer in combined grammar (fixes #372)
This commit is contained in:
parent
fe5f93a0f4
commit
4fc32e1f7c
|
@ -302,7 +302,9 @@ public class GrammarTransformPipeline {
|
||||||
if ( Grammar.lexerOptions.contains(optionName) &&
|
if ( Grammar.lexerOptions.contains(optionName) &&
|
||||||
!Grammar.doNotCopyOptionsToLexer.contains(optionName) )
|
!Grammar.doNotCopyOptionsToLexer.contains(optionName) )
|
||||||
{
|
{
|
||||||
lexerOptionsRoot.addChild((Tree)adaptor.dupTree(o));
|
GrammarAST optionTree = (GrammarAST)adaptor.dupTree(o);
|
||||||
|
lexerOptionsRoot.addChild(optionTree);
|
||||||
|
lexerAST.setOption(optionName, (GrammarAST)optionTree.getChild(1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue