Translate #
Translate (Syntax.translate
) an abstract syntax tree Syntax.Ast.Ast
into a high level intermediate representation Syntax.Hir
.
Translator state
- stack : Array Syntax.HirFrame
Our call stack, but on the heap.
- flags : Syntax.Flags
The current flag settings.
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
This method is called on an Ast
before descending into child Ast
nodes.
Equations
- One or more equations did not get rendered due to their size.
Instances For
This method is called on an Ast
after descending all of its child Ast
nodes.
Equations
- One or more equations did not get rendered due to their size.
Instances For
This method is called on every [ClassSetItem
] before descending into child nodes.
Equations
- One or more equations did not get rendered due to their size.
- Syntax.visit_class_set_item_pre ast = pure ()
Instances For
This method is called on every [ClassSetItem
] after descending into child nodes.
Equations
- One or more equations did not get rendered due to their size.
Instances For
This method is called on every [ClassSetBinaryOp
] before descending into child nodes.
Equations
- Syntax.visit_class_set_binary_op_pre = do let t ← get set { stack := t.stack.push (Syntax.HirFrame.ClassUnicode Syntax.ClassUnicode.empty), flags := t.flags }
Instances For
This method is called between the left hand and right hand child nodes.
Equations
- Syntax.visit_class_set_binary_op_in = do let t ← get set { stack := t.stack.push (Syntax.HirFrame.ClassUnicode Syntax.ClassUnicode.empty), flags := t.flags }
Instances For
This method is called on every [ClassSetBinaryOp
] after descending into child nodes.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Translate the given abstract syntax tree into a high level intermediate representation.
Equations
- Syntax.translate flags ast = Syntax.AstItems.visit Syntax.instVisitorHirTranslator { stack := #[], flags := flags } ast