diff --git a/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/ParseTreeMatch.java b/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/ParseTreeMatch.java index 3c3596cb8..e044476eb 100644 --- a/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/ParseTreeMatch.java +++ b/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/ParseTreeMatch.java @@ -100,18 +100,6 @@ public class ParseTreeMatch { return mismatchedNode; } - /** Return the text of the entire subtree matched. It does not include - * whitespace stripped by the lexer. - */ - public String getText() { - return tree.getText(); - } - - /** Did the tree vs pattern fail to match? */ - public boolean failed() { - return mismatchedNode!=null; - } - /** Did the tree vs pattern match? */ public boolean succeeded() { return mismatchedNode==null; diff --git a/tool/test/org/antlr/v4/test/TestParseTreeMatcher.java b/tool/test/org/antlr/v4/test/TestParseTreeMatcher.java index baaed0e0a..2cde13ab7 100644 --- a/tool/test/org/antlr/v4/test/TestParseTreeMatcher.java +++ b/tool/test/org/antlr/v4/test/TestParseTreeMatcher.java @@ -214,7 +214,7 @@ public class TestParseTreeMatcher extends BaseTest { assertEquals("[y]", m.getAll("b").toString()); assertEquals("[x, y, z]", m.getAll("ID").toString()); // ordered - assertEquals("xyz;", m.getText()); // whitespace stripped by lexer + assertEquals("xyz;", m.getTree().getText()); // whitespace stripped by lexer assertNull(m.get("undefined")); assertEquals("[]", m.getAll("undefined").toString());