Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghislain Fourny committed Jul 31, 2024
1 parent 684d588 commit f225718
Showing 1 changed file with 22 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,6 @@ protected ExpressionClassification defaultAction(Node node, ExpressionClassifica
return expressionClassification;
}

if (node instanceof StatementsAndExpr) {
((StatementsAndExpr) node).setExpressionClassification(expressionClassification);
return expressionClassification;
}
if (node instanceof StatementsAndOptionalExpr) {
((StatementsAndOptionalExpr) node).setExpressionClassification(expressionClassification);
return expressionClassification;
}
if (node instanceof InlineFunctionExpression) {
((InlineFunctionExpression) node).setExpressionClassification(expressionClassification);
return expressionClassification;
Expand Down Expand Up @@ -95,6 +87,28 @@ public ExpressionClassification visitDescendants(Node node, ExpressionClassifica
return result;
}

@Override
public ExpressionClassification visitStatementsAndOptionalExpr(
StatementsAndOptionalExpr expression,
ExpressionClassification argument
) {
this.visitDescendants(expression, argument);
Expression e = expression.getExpression();
expression.setExpressionClassification(e.getExpressionClassification());
return e.getExpressionClassification();
}

@Override
public ExpressionClassification visitStatementsAndExpr(
StatementsAndExpr expression,
ExpressionClassification argument
) {
this.visitDescendants(expression, argument);
Expression e = expression.getExpression();
expression.setExpressionClassification(e.getExpressionClassification());
return e.getExpressionClassification();
}

@Override
public ExpressionClassification visitCommaExpression(
CommaExpression expression,
Expand Down

0 comments on commit f225718

Please sign in to comment.