Finch Notation Internals
Finch IR is a tree structure that represents a finch program. Different types of nodes are delineated by a FinchKind enum, for type stability. There are a few useful functions to be aware of:
Finch.FinchNotation.FinchNode — Type
FinchNodeA Finch IR node, used to represent an imperative, physical Finch program.
The FinchNode struct represents many different Finch IR nodes. The nodes are differentiated by a FinchNotation.FinchNodeKind enum.
Finch.FinchNotation.cached — Constant
cached(val, ref)Finch AST expression val, equivalent to the quoted expression ref
Finch.FinchNotation.finch_leaf — Function
finch_leaf(x)Return a terminal finch node wrapper around x. A convenience function to determine whether x should be understood by default as a literal, value, or virtual.
Finch.FinchNotation.isstateful — Function
isstateful(node)Returns true if the node is a finch statement, and false if the node is an index expression. Typically, statements specify control flow and expressions describe values.
Finch.FinchNotation.isliteral — Function
isliteral(node)Returns true if the node is a finch literal
Finch.FinchNotation.isvalue — Function
isvalue(node)Returns true if the node is a finch value
Finch.FinchNotation.isconstant — Function
isconstant(node)Returns true if the node can be expected to be constant within the current finch context
Finch.FinchNotation.isvirtual — Function
isvirtual(node)Returns true if the node is a finch virtual
Finch.FinchNotation.isvariable — Function
isvariable(node)Returns true if the node is a finch variable
Finch.FinchNotation.isindex — Function
isindex(node)Returns true if the node is a finch index