aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2020-11-03 18:36:55 -0700
committerMelody Horn <melody@boringcactus.com>2020-11-03 18:36:55 -0700
commit8acf4ec442a1837e848208e3c08078d86d4a4c11 (patch)
tree03cbae855104b8915ae0a1d3de2ca4756b19ea66
parent529afef55ce9412c2726e97c525eef34c567cbcb (diff)
downloadspec-8acf4ec442a1837e848208e3c08078d86d4a4c11.tar.gz
spec-8acf4ec442a1837e848208e3c08078d86d4a4c11.zip
add the last couple statement types
-rw-r--r--language/statements/index.rst25
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