cashscript icon indicating copy to clipboard operation
cashscript copied to clipboard

Consider maybe internally replacing function call nodes with operator nodes

Open rkalis opened this issue 6 years ago • 3 comments

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.

rkalis avatar Sep 15 '19 08:09 rkalis

This could also be done for the SizeOp, SplitOp, and TupleIndexOp

rkalis avatar May 18 '20 09:05 rkalis

I replaced SizeOp and SplitOp with Unary and Binary operator nodes.

rkalis avatar May 26 '20 09:05 rkalis