Explicit greedy option overrides implicit greedy option
This commit is contained in:
parent
65793adfc8
commit
39c73302f6
|
@ -622,7 +622,11 @@ public class ParserATNFactory implements ATNFactory {
|
|||
public boolean isGreedy(@NotNull BlockAST blkAST) {
|
||||
boolean greedy = true;
|
||||
String greedyOption = blkAST.getOptionString("greedy");
|
||||
if ( blockHasWildcardAlt(blkAST) || greedyOption!=null&&greedyOption.equals("false") ) {
|
||||
if (greedyOption != null) {
|
||||
return Boolean.parseBoolean(greedyOption);
|
||||
}
|
||||
|
||||
if ( blockHasWildcardAlt(blkAST) ) {
|
||||
greedy = false;
|
||||
}
|
||||
return greedy;
|
||||
|
|
Loading…
Reference in New Issue