mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-05 03:44:45 -04:00
Add an error for C-style pointer selector expressions using '->' when parsing
This commit is contained in:
1 parent
3fc60930e6
commit
b1663a14e9
1 file changed
+7
@@ -2203,6 +2203,13 @@ Ast *parse_atom_expr(AstFile *f, Ast *operand, bool lhs) {
|
||||
}
|
||||
} break;
|
||||
|
||||
case Token_ArrowRight: {
|
||||
Token token = advance_token(f);
|
||||
syntax_error(token, "Selector expressions use '.' rather than '->'");
|
||||
operand = ast_selector_expr(f, token, operand, parse_ident(f));
|
||||
break;
|
||||
}
|
||||
|
||||
case Token_OpenBracket: {
|
||||
if (lhs) {
|
||||
// TODO(bill): Handle this
|
||||
|
||||
Reference in new issue
Block a user