Skip to content

Commit

Permalink
Update for changes to MatchCase
Browse files Browse the repository at this point in the history
A MatchCase now accepts a MatchList, not an ExpressionList, as part of
the new unified syntax for type and expression cases; this is a minimal
patch just to get the code to compile again. Full support for the new
match syntax is subject of #140.
  • Loading branch information
lucaswerkmeister committed Sep 9, 2018
1 parent aa4523f commit 1cea49d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/ceylon/ast/redhat/RedHatTransformer.ceylon
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ import org.eclipse.ceylon.compiler.typechecker.tree {
JLogicalOp=LogicalOp,
JLiteral=Literal,
JMatchCase=MatchCase,
JMatchList=MatchList,
JMemberLiteral=MemberLiteral,
JMemberOp=MemberOp,
JMemberOperator=MemberOperator,
Expand Down Expand Up @@ -2217,7 +2218,7 @@ shared class RedHatTransformer(TokenFactory tokens) satisfies ImmediateNarrowing

shared actual JMatchCase transformMatchCase(MatchCase that) {
JMatchCase ret = JMatchCase(null);
JExpressionList expressions = JExpressionList(null);
JMatchList expressions = JMatchList(null);
expressions.addExpression(wrapTerm(transformExpression(that.expressions.first)));
for (expression in that.expressions.rest) {
expressions.endToken = tokens.token(",", comma);
Expand Down

0 comments on commit 1cea49d

Please sign in to comment.