Skip to content

Commit

Permalink
change
Browse files Browse the repository at this point in the history
  • Loading branch information
StunxFS committed Dec 7, 2023
1 parent 92aecfb commit 30a130e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
12 changes: 2 additions & 10 deletions rivetc/src/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,9 +717,7 @@ def parse_relational_expr(self):
right = ast.EnumLiteral(name, pos, True)
else:
right = ast.TypeNode(self.parse_type(), pos)
if self.accept(Kind.KwAs):
var = self.parse_var_decl(support_ref = False)
elif self.accept(Kind.Lparen):
if self.accept(Kind.Lparen):
var = self.parse_var_decl(support_ref = False)
self.expect(Kind.Rparen)
else:
Expand Down Expand Up @@ -1138,13 +1136,7 @@ def parse_match_expr(self):
pats.append(branch_expr)
if not self.accept(Kind.Comma):
break
if self.accept(Kind.KwAs):
report.warn("deprecated", self.tok.pos)
has_var = True
var_is_mut = self.accept(Kind.KwMut)
var_pos = self.tok.pos
var_name = self.parse_name()
elif self.accept(Kind.Lparen):
if self.accept(Kind.Lparen):
has_var = True
var_is_mut = self.accept(Kind.KwMut)
var_pos = self.tok.pos
Expand Down
2 changes: 1 addition & 1 deletion rivetc/src/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,9 @@ def walk_decls(self, decls):
attributes = decl.attributes
)
)
decl.sym.is_main = decl.is_main
except utils.CompilerError(e):
report.error(e.args[0], decl.name_pos)
decl.sym.is_main = decl.is_main
self.abi = old_abi
self.sym = old_sym

Expand Down

0 comments on commit 30a130e

Please sign in to comment.