aboutsummaryrefslogtreecommitdiff
path: root/language/statements
diff options
context:
space:
mode:
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