aboutsummaryrefslogtreecommitdiff
path: root/language/statements
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2020-11-03 18:12:32 -0700
committerMelody Horn <melody@boringcactus.com>2020-11-03 18:12:32 -0700
commit529afef55ce9412c2726e97c525eef34c567cbcb (patch)
treee8cc9f0c1ef978b9eb8bdfaa7b5149b5855056a4 /language/statements
parent8779aff362fc03010a9656175a7cc26546e47e93 (diff)
downloadspec-529afef55ce9412c2726e97c525eef34c567cbcb.tar.gz
spec-529afef55ce9412c2726e97c525eef34c567cbcb.zip
stub out assignment statements
Diffstat (limited to 'language/statements')
-rw-r--r--language/statements/assignment.rst15
-rw-r--r--language/statements/index.rst1
2 files changed, 16 insertions, 0 deletions
diff --git a/language/statements/assignment.rst b/language/statements/assignment.rst
new file mode 100644
index 0000000..f8c1600
--- /dev/null
+++ b/language/statements/assignment.rst
@@ -0,0 +1,15 @@
+Assignments
+^^^^^^^^^^^
+
+.. crowbar:element:: AssignmentStatement <- AssignmentBody ';'
+ AssignmentBody <- DirectAssignmentBody / UpdateAssignmentBody / CrementAssignmentBody
+
+.. crowbar:element:: DirectAssignmentBody <- AssignmentTarget '=' Expression
+
+ .. todo:: define direct assignment
+
+.. crowbar:element:: UpdateAssignmentBody <- AssignmentTarget ('+=' / '-=' / '*=' / '/=' / '%=' / '&=' / '^=' / '|=') Expression
+
+.. crowbar:element:: CrementAssignmentBody <- AssignmentTarget ('++' / '--')
+
+.. todo:: define other assignments relative to direct
diff --git a/language/statements/index.rst b/language/statements/index.rst
index ac76f3b..623eb23 100644
--- a/language/statements/index.rst
+++ b/language/statements/index.rst
@@ -32,3 +32,4 @@ Statements
variables
structure
flow-control
+ assignment