diff --git a/src/main/java/org/sablecc/sablecc/parser/Parser.java b/src/main/java/org/sablecc/sablecc/parser/Parser.java index 2357f1d7ffab337e5178c0f131812c42ad98ce4b..274457403a1e9b8b4014b1e16e8dea30c53e9414 100644 --- a/src/main/java/org/sablecc/sablecc/parser/Parser.java +++ b/src/main/java/org/sablecc/sablecc/parser/Parser.java @@ -45,11 +45,6 @@ public class Parser implements IParser public Map<PositionedNode, SourcecodeRange> getMapping() { return this.mapping; } protected void checkResult(Object elementToCheck) { - checkResult(elementToCheck, false); - } - - - protected void checkResult(Object elementToCheck, boolean slurp) { // nodes with no tokens or sub nodes at all may exist if (this.firstPopped == null) { return; @@ -73,7 +68,7 @@ public class Parser implements IParser final PositionedNode node = (PositionedNode) elementToCheck; - if (!this.getMapping().containsKey(node) || slurp ) { + if (!this.getMapping().containsKey(node)) { // dealing with a one-token element if (this.lastPopped == null) { this.lastPopped = this.firstPopped; diff --git a/src/main/resources/org/sablecc/sablecc/parser.txt b/src/main/resources/org/sablecc/sablecc/parser.txt index 218852d1cac4b7f5dc1fec949060c8557974b05b..90700588ec2eed94dd529d92ed6120336a3ad76c 100644 --- a/src/main/resources/org/sablecc/sablecc/parser.txt +++ b/src/main/resources/org/sablecc/sablecc/parser.txt @@ -53,11 +53,6 @@ public class Parser implements IParser public Map<PositionedNode, SourcecodeRange> getMapping() { return this.mapping; } protected void checkResult(Object elementToCheck) { - checkResult(elementToCheck, false); - } - - - protected void checkResult(Object elementToCheck, boolean slurp) { // nodes with no tokens or sub nodes at all may exist if (this.firstPopped == null) { return; @@ -81,7 +76,7 @@ public class Parser implements IParser final PositionedNode node = (PositionedNode) elementToCheck; - if (!this.getMapping().containsKey(node) || slurp ) { + if (!this.getMapping().containsKey(node)) { // dealing with a one-token element if (this.lastPopped == null) { this.lastPopped = this.firstPopped;