Ethgoin commited on
Commit
71df62b
verified
1 Parent(s): 3fdac99

Update parser.py

Browse files
Files changed (1) hide show
  1. parser.py +3 -3
parser.py CHANGED
@@ -62,7 +62,7 @@ class Parser:
62
  token_type, token_value = self.current()
63
  if token_type == "IDENTIFIER":
64
  return {"type": "var", "value": self.match("IDENTIFIER")[1]}
65
- elif token_type == "NUMERO":
66
- return {"type": "num", "value": self.match("NUMERO")[1]}
67
  else:
68
- raise SyntaxError(f"Expresi贸n inv谩lida: {self.current()}")
 
62
  token_type, token_value = self.current()
63
  if token_type == "IDENTIFIER":
64
  return {"type": "var", "value": self.match("IDENTIFIER")[1]}
65
+ elif token_type in ("INT", "FLOAT"):
66
+ return {"type": "num", "value": self.match(token_type)[1]}
67
  else:
68
+ raise SyntaxError(f"Expresi贸n inv谩lida: {self.current()}")