From 529afef55ce9412c2726e97c525eef34c567cbcb Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Tue, 3 Nov 2020 18:12:32 -0700 Subject: stub out assignment statements --- language/statements/assignment.rst | 15 +++++++++++++++ language/statements/index.rst | 1 + 2 files changed, 16 insertions(+) create mode 100644 language/statements/assignment.rst (limited to 'language') 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 -- cgit v1.2.3