summaryrefslogtreecommitdiff
path: root/projects/hackc/expressions.py
diff options
context:
space:
mode:
authorFrederick Yin <fkfd@fkfd.me>2022-09-03 11:56:52 +0800
committerFrederick Yin <fkfd@fkfd.me>2022-09-03 11:56:52 +0800
commitc040e67c4c0cd29e02d4195e3ab85610b457d27e (patch)
tree4785c2178af349b555a70ec6e35a150476c1616f /projects/hackc/expressions.py
parentdfb5ee45fb68aca09bd0ac9967c6b574f932d39f (diff)
hackc: LetStatement accepts SubscriptTermHEADmain
Diffstat (limited to 'projects/hackc/expressions.py')
-rw-r--r--projects/hackc/expressions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/projects/hackc/expressions.py b/projects/hackc/expressions.py
index 2e08cef..dcdb961 100644
--- a/projects/hackc/expressions.py
+++ b/projects/hackc/expressions.py
@@ -55,7 +55,7 @@ class SubscriptTerm:
"""Construct a subscripted array term.
Format:
- <var> '[' <subscript> ']'
+ <var> '[' <expression> ']'
"""
if tokens[0].type != "identifier" or tokens[1] != LEFT_BRACKET:
return (None, 0)