@Test public void for_each() throws Exception { ActionParser<Tree> parser = PHPParserBuilder.createParser(PHPLexicalGrammar.FOREACH_STATEMENT); ForEachStatementTree tree = (ForEachStatementTree) parser.parse("foreach ($arr as &$value) { }"); Assertions.assertThat(tree.expression().getParent()).isSameAs(tree); }
@Override public Tree parse(File file) { return setParents(super.parse(file)); }
PHPParser extends ActionParser<Tree> { @Override public Tree parse(File file) { return setParents(super.parse(file)); } }
PHPParser extends ActionParser<Tree> { @Override public Tree parse(File file) { return setParents(super.parse(file)); } PHPParser(GrammarRuleKey rootRule, int lineOffset); }
PHPParser extends ActionParser<Tree> { @Override public Tree parse(File file) { return setParents(super.parse(file)); } PHPParser(GrammarRuleKey rootRule, int lineOffset); @Override Tree parse(File file); @Override Tree parse(String source); }
PHPParser extends ActionParser<Tree> { @Override public Tree parse(File file) { return setParents(super.parse(file)); } PHPParser(GrammarRuleKey rootRule, int lineOffset); @Override Tree parse(File file); @Override Tree parse(String source);  }