Skip to content

Commit

Permalink
Убрана очистка кэша
Browse files Browse the repository at this point in the history
  • Loading branch information
nixel2007 committed May 26, 2020
1 parent 4de6f36 commit b56d17f
Showing 1 changed file with 0 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,47 +55,6 @@ public List<Token> getTokens() {
return tokens.getOrCompute();
}

@Override
public void copyFrom(ParserRuleContext ctx) {
super.copyFrom(ctx);
clearCachedValues();
}

@Override
public <T extends ParseTree> T addAnyChild(T t) {
clearCachedValues();
return super.addAnyChild(t);
}

@Override
public void addChild(RuleContext ruleInvocation) {
super.addChild(ruleInvocation);
clearCachedValues();
}

@Override
public void addChild(TerminalNode t) {
super.addChild(t);
clearCachedValues();
}

@Override
public ErrorNode addErrorNode(ErrorNode errorNode) {
clearCachedValues();
return super.addErrorNode(errorNode);
}

@Override
public void removeLastChild() {
super.removeLastChild();
clearCachedValues();
}

private void clearCachedValues() {
text.clear();
tokens.clear();
}

private List<Token> computeTokens() {
if ( children == null ) {
return Collections.emptyList();
Expand Down

0 comments on commit b56d17f

Please sign in to comment.