cashscript
cashscript copied to clipboard
Consider maybe internally replacing function call nodes with operator nodes
Currently the AST includes nodes of the type FunctionCall, which are things like max(int, int). These "functions" are currently stored inside a global symbol table, but since they are essentially language features, there is no reason for these not to be hardcoded. Hardcoding this should simplify the compiler as there is no need to keep a global symbol table for this.
This also frees up the Function Call construct for when libraries or custom functions will be introduced to the language.
This could also be done for the SizeOp, SplitOp, and TupleIndexOp
I replaced SizeOp and SplitOp with Unary and Binary operator nodes.