aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSamuel Lidén Borell <samuel@kodafritt.se>2017-08-17 21:53:14 +0200
committerSamuel Lidén Borell <samuel@kodafritt.se>2017-08-17 21:53:14 +0200
commit76871d921fa7630b3bce5abc935d29ddac2ea541 (patch)
treea51c248df0aea7c00e10b21a3e0e92daf4439eaf /docs
parent034bd52ef08422270ddcd39dead0b6e41dce7c54 (diff)
downloadlrl-76871d921fa7630b3bce5abc935d29ddac2ea541.tar.gz
lrl-76871d921fa7630b3bce5abc935d29ddac2ea541.tar.bz2
lrl-76871d921fa7630b3bce5abc935d29ddac2ea541.zip
C backend: Implement non-scalar switch statement
Diffstat (limited to 'docs')
-rw-r--r--docs/language_manual/statements.md9
1 files changed, 4 insertions, 5 deletions
diff --git a/docs/language_manual/statements.md b/docs/language_manual/statements.md
index 7af1fcd..c65f4f7 100644
--- a/docs/language_manual/statements.md
+++ b/docs/language_manual/statements.md
@@ -326,12 +326,11 @@ Syntax:
default defaultstatement
}
-**TODO** implement non-scalar switch
-
Evaluates the expression once and then compares it with the case values.
-The case values must be compile-time constants. When a matching case value
-is found, the following statement is executed. If no matching case value is
-found then the default statement is executed.
+The expression can have any type, including array or struct type, but the case
+values must be compile-time constants. When a matching case value is found,
+the following statement is executed. If no matching case value is found then
+the default statement is executed.
When the end of a case statement is reached, then the switch statement is
exited.