diff options
author | Melody Horn <melody@boringcactus.com> | 2020-11-03 18:36:55 -0700 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2020-11-03 18:36:55 -0700 |
commit | 8acf4ec442a1837e848208e3c08078d86d4a4c11 (patch) | |
tree | 03cbae855104b8915ae0a1d3de2ca4756b19ea66 /language/statements | |
parent | 529afef55ce9412c2726e97c525eef34c567cbcb (diff) | |
download | spec-8acf4ec442a1837e848208e3c08078d86d4a4c11.tar.gz spec-8acf4ec442a1837e848208e3c08078d86d4a4c11.zip |
add the last couple statement types
Diffstat (limited to 'language/statements')
-rw-r--r-- | language/statements/index.rst | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/language/statements/index.rst b/language/statements/index.rst index 623eb23..93ff690 100644 --- a/language/statements/index.rst +++ b/language/statements/index.rst @@ -26,6 +26,31 @@ Statements None. +.. crowbar:element:: FragileStatement <- 'fragile' Statement + + Some behaviors are difficult to ensure the robustness of at compile time, and these behaviors are defined in this specification as *fragile*. + Fragile behaviors used outside of fragile statements should produce a compiler error. + + Compile-time Behavior: + + Fragile behaviors used inside a fragile statement must not produce a compiler error for their fragility. + Nesting fragile statements should produce a compiler error. + + Runtime Behavior: + + The contained statement is executed. + +.. crowbar:element:: ExpressionStatement <- Expression ';' + + Compile-time Behavior: + + If the expression is not a function call, the compiler may emit a warning. + + Runtime Behavior: + + The expression is evaluated and the resulting value is discarded. + Function calls must be fully evaluated, but expressions that are not function calls may be optimized out. + .. toctree:: :maxdepth: 1 |