-
Notifications
You must be signed in to change notification settings - Fork 0
Native Types
AbePralle edited this page Jan 4, 2022
·
5 revisions
------------------------------------------------------------
nativeTypes
------------------------------------------------------------
Alpha Beta
Gamma, Delta
Epsilon
...
- Constructors can use native types as parameters / node properties.
- No extended
Cmdnode is created for native types. - Native types are not visited in
Visitor. - Native types are copied but not
.cloned()in copy constructors.
Here is a parser line that creates an Access node which may resolve to a local variable, a method, etc.:
- access
on IDENTIFIER
produce Access(name=content)
endOn
At the end of the parser is a dummy routine that generates additional node types that will be used in resolving the AST:
- additional_node_types
create ReadLocal(info:LocalInfo)
create WriteLocal(info:LocalInfo)
To prevent Froley from assuming LocalInfo is an extended Cmd and adding it to the Visitor infrastructure etc., we'll declare it as a native type:
------------------------------------------------------------
nativeTypes
------------------------------------------------------------
LocalInfo