diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-11-26 00:04:51 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-11-26 00:04:51 -0600 |
commit | 3b94568c82fd19aae15fc13e3374241b3ef74eda (patch) | |
tree | 80431d2c2dace4d70a2eca1fc2b3584423084d5b /compilador/parse | |
parent | 819fdb201b87e764063a50cb729470da402c720f (diff) | |
download | javanol-3b94568c82fd19aae15fc13e3374241b3ef74eda.tar.gz javanol-3b94568c82fd19aae15fc13e3374241b3ef74eda.tar.bz2 javanol-3b94568c82fd19aae15fc13e3374241b3ef74eda.zip |
Se arregla literal de caracter y se añade screenshot al README
Diffstat (limited to 'compilador/parse')
-rw-r--r-- | compilador/parse/expr.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compilador/parse/expr.py b/compilador/parse/expr.py index f6527bd..87e054f 100644 --- a/compilador/parse/expr.py +++ b/compilador/parse/expr.py @@ -153,7 +153,7 @@ class ParseExpr: def constant(self) -> (Expr | Error): tok: LexToken = self.parser.lex() expr: Optional[ConstantExpr] = None - if tok.tipo in [Token.STRING_LIT, Token.BOOLEAN_LIT]: + if tok.tipo in [Token.STRING_LIT, Token.BOOLEAN_LIT, Token.CHAR_LIT]: expr = Value(value = tok.valor) elif tok.tipo == Token.INT_LIT: expr = NumberConstant(value = tok.valor) |