Constant Folding Module - Evaluate Expressions in compile time
Methods
-
inner constantFolding(code) → {string}
-
A function that evaluating expressions
Parameters:
Name Type Description codestring A string that contain a expression Returns:
string - Returns result of expression -
inner replaceByArrayExpression(node)
-
A function that evalute a ArrayExpression
Parameters:
Name Type Description nodeObject Node of AST -
inner replaceByLiteral(node)
-
A function that evaluate a Literal
Parameters:
Name Type Description nodeObject Node of AST