aboutsummaryrefslogtreecommitdiff
path: root/compilador/astree
diff options
context:
space:
mode:
Diffstat (limited to 'compilador/astree')
-rw-r--r--compilador/astree/expr.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/compilador/astree/expr.py b/compilador/astree/expr.py
index d5a2cb0..c074553 100644
--- a/compilador/astree/expr.py
+++ b/compilador/astree/expr.py
@@ -114,9 +114,17 @@ class ReadExpr:
# A return statement.
#
-# return a
+# retorna a
ReturnExpr = Optional[Expr]
+# A while expression.
+#
+# mientras (cond) { }
+@dataclass
+class WhileExpr:
+ cond: Expr
+ body: Expr
+
# A Javañol expression.
Expr = (AccessExpr | AssignExpr | BinarithmExpr | CallExpr |
ConstantExpr | ForExpr | IfExpr | CompoundExpr |