mirror of
https://github.com/Alvin-Zilverstand/femcode.git
synced 2026-03-06 02:56:56 +01:00
feat: Implement dictionaries and property access
This commit is contained in:
@@ -274,7 +274,7 @@ class Parser:
|
||||
return self.parse_function_call(token)
|
||||
elif next_token.type == 'DOT':
|
||||
# It's a property access
|
||||
return self.parse_property_access(Variable(token)) # Pass Variable node as target
|
||||
return self.parse_property_access(Variable(token))
|
||||
elif next_token.type == 'LBRACKET':
|
||||
# It's an index access
|
||||
return self.parse_index_access(Variable(token))
|
||||
@@ -406,4 +406,4 @@ class Parser:
|
||||
self.consume('DOT') # Assuming DOT token for property access
|
||||
property_name_token = self.get_current_token()
|
||||
self.consume('ID')
|
||||
return PropertyAccess(target_node, property_name_token.value)
|
||||
return PropertyAccess(target_node, property_name_token.value)
|
||||
|
||||
Reference in New Issue
Block a user