Skip to content
Snippets Groups Projects

New new string

Merged Xun Yang requested to merge new-new-string into master
3 files
+ 19
7
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 2
1
@@ -111,7 +111,7 @@ class BlockNode(ASTNode):
# 1. variableDcl type ID
# 2. variableDcl type ID ASSIGN variableInit
class VarDclNode(ASTNode):
def __init__(self, parseTree, typeName, checkAssign=False):
def __init__(self, parseTree, typeName, checkAssign=False, isField=None):
self.parseTree = parseTree
self.dclType = None
self.name = None # variable name
@@ -119,6 +119,7 @@ class VarDclNode(ASTNode):
self.env = None
self.children = []
self.typeName = typeName
self.isField = isField
self.dclType = TypeNode(parseTree.children[0], typeName)
self.name = parseTree.children[1].lex
Loading