summaryrefslogtreecommitdiff
path: root/src/parse_ast.ml
diff options
context:
space:
mode:
authorGabriel Kerneis2013-08-19 12:20:48 +0100
committerGabriel Kerneis2013-08-19 12:20:48 +0100
commit2209e971363bbd294194f9799f290b7814d1dfd6 (patch)
tree0c70fc02d0fa8625929ae33a20ddf47f902ac4b7 /src/parse_ast.ml
parent5cf0230381eab9e5b96ea9ebbdcac4cb430c4a82 (diff)
Add loops and document optionnal else in conditional
Syntax: foreach id from exp (to|downto) exp (by exp)? exp foreach and by are keywords; from, to and downto aren't.
Diffstat (limited to 'src/parse_ast.ml')
-rw-r--r--src/parse_ast.ml1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/parse_ast.ml b/src/parse_ast.ml
index e24294ae..f527c402 100644
--- a/src/parse_ast.ml
+++ b/src/parse_ast.ml
@@ -195,6 +195,7 @@ exp_aux = (* Expression *)
| E_app_infix of exp * id * exp (* infix function application *)
| E_tuple of (exp) list (* tuple *)
| E_if of exp * exp * exp (* conditional *)
+ | E_for of id * exp * exp * exp * exp (* loop *)
| E_vector of (exp) list (* vector (indexed from 0) *)
| E_vector_indexed of ((int * exp)) list (* vector (indexed consecutively) *)
| E_vector_access of exp * exp (* vector access *)