aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index 32ecc9885a..0dfb60a47a 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -2255,8 +2255,8 @@ static AstNode *ast_parse_switch_expr(ParseContext *pc, int *token_index, bool m
break;
}
- Token *arrow_or_comma = &pc->tokens->at(*token_index);
- if (arrow_or_comma->id == TokenIdComma) {
+ Token *arrow_or_colon = &pc->tokens->at(*token_index);
+ if (arrow_or_colon->id == TokenIdColon) {
*token_index += 1;
ast_eat_token(pc, token_index, TokenIdLParen);
prong_node->data.switch_prong.var_symbol = ast_parse_symbol(pc, token_index);