Skip to content

Commit

Permalink
fix: GET/SET and END_GET/END_SET must match
Browse files Browse the repository at this point in the history
  • Loading branch information
abroooo committed Jan 31, 2025
1 parent 3386fe4 commit 6b4deca
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,13 @@ fn parse_property(
variable_blocks.push(parse_variable_block(lexer, LinkageType::Internal));
}

let statements = parse_body_in_region(lexer, vec![Token::KeywordEndGet, Token::KeywordEndSet]);
let statements = parse_body_in_region(
lexer,
match kind {
PropertyKind::Get => vec![Token::KeywordEndGet],
PropertyKind::Set => vec![Token::KeywordEndSet],
},
);
implementations.push(PropertyImplementation { kind, variable_blocks, body: statements, location });
}

Expand Down

0 comments on commit 6b4deca

Please sign in to comment.