diff options
| author | Alasdair Armstrong | 2017-09-26 17:10:06 +0100 |
|---|---|---|
| committer | Alasdair Armstrong | 2017-09-26 17:10:06 +0100 |
| commit | ced56765ec9324a0e690cbb4e790280d17413f99 (patch) | |
| tree | 18584c77dc93b553b840008774fae4b46a622500 /src/ast.ml | |
| parent | 15309c879d2c877953512c401e66a7a48af6df97 (diff) | |
Added while-do and repeat-until loops to sail for translating ASL
Diffstat (limited to 'src/ast.ml')
| -rw-r--r-- | src/ast.ml | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -289,6 +289,7 @@ type 'a reg_id_aux = RI_id of id +type loop = While | Until type 'a exp_aux = (* Expression *) @@ -301,7 +302,8 @@ type | E_app_infix of 'a exp * id * 'a exp (* infix function application *) | E_tuple of ('a exp) list (* tuple *) | E_if of 'a exp * 'a exp * 'a exp (* conditional *) - | E_for of id * 'a exp * 'a exp * 'a exp * order * 'a exp (* loop *) + | E_for of id * 'a exp * 'a exp * 'a exp * order * 'a exp (* for loop *) + | E_loop of loop * 'a exp * 'a exp | E_vector of ('a exp) list (* vector (indexed from 0) *) | E_vector_indexed of ((int * 'a exp)) list * 'a opt_default (* vector (indexed consecutively) *) | E_vector_access of 'a exp * 'a exp (* vector access *) |
