Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions common/src/main/java/dev/cel/common/ast/CelExprFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,5 @@ protected long nextExprId() {
return ++exprId;
}

/** Attempts to decrement the next expr ID if possible. */
protected void maybeDeleteId(long id) {
if (id == exprId - 1) {
exprId--;
}
}

protected CelExprFactory() {}
}
8 changes: 1 addition & 7 deletions parser/src/main/java/dev/cel/parser/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ private Optional<CelExpr> visitMacro(
CelExpr.newBuilder().setCall(callExpr.build()).build());
}

exprFactory.maybeDeleteId(expr.id());
sourceInfo.removePositions(expr.id());
return expandedMacro;
}

Expand Down Expand Up @@ -1165,12 +1165,6 @@ private long nextExprId(int position) {
return exprId;
}

@Override
protected void maybeDeleteId(long id) {
sourceInfo.removePositions(id);
super.maybeDeleteId(id);
}

@Override
public long copyExprId(long id) {
return nextExprId(getPosition(id));
Expand Down
Loading