summaryrefslogtreecommitdiff
path: root/language/l2.ott
diff options
context:
space:
mode:
Diffstat (limited to 'language/l2.ott')
-rw-r--r--language/l2.ott3
1 files changed, 2 insertions, 1 deletions
diff --git a/language/l2.ott b/language/l2.ott
index 4af3b9a3..96a30265 100644
--- a/language/l2.ott
+++ b/language/l2.ott
@@ -667,6 +667,7 @@ exp :: 'E_' ::=
| exit exp :: :: exit
{{ com expression to halt all current execution, potentially calling a system, trap, or interrupt handler with exp }}
+ | return exp :: :: return {{ com expression to end current function execution and return the value of exp from the function; this can be used to break out of for loops }}
| assert ( exp , exp' ) :: :: assert
{{ com expression to halt with error, when the first expression is false, reporting the optional string as an error }}
| ( exp ) :: S :: paren {{ ichlo [[exp]] }}
@@ -678,7 +679,7 @@ exp :: 'E_' ::=
| comment exp :: :: comment_struc {{ com For generated structured comments }}
| let lexp = exp in exp' :: :: internal_let {{ com This is an internal node for compilation that demonstrates the scope of a local mutable variable }}
| let pat = exp in exp' :: :: internal_plet {{ com This is an internal node, used to distinguised some introduced lets during processing from original ones }}
- | return ( exp ) :: :: internal_return {{ com For internal use to embed into monad definition }}
+ | return_int ( exp ) :: :: internal_return {{ com For internal use to embed into monad definition }}
lexp :: 'LEXP_' ::= {{ com lvalue expression }}