This took a bit to track down, the first issue was with the copy operator not correctly indexing the copy as well as a class cast exception. Once corrected, the function generated values resulted in a colour gradient that was the wrong colour, red instead of blue.
The colour issue was the result of an error in how we handled the "if" operator which should evaluate an expression {} of operands if true is fond on the stack. We correctly manipulated the stack but failed to execute the operands pushed back on the stack. So I tweaked the lexer to peek at the top of the stack to see if a operand needed to be executed.
This took a bit to track down, the first issue was with the copy operator not correctly indexing the copy as well as a class cast exception. Once corrected, the function generated values resulted in a colour gradient that was the wrong colour, red instead of blue.
The colour issue was the result of an error in how we handled the "if" operator which should evaluate an expression {} of operands if true is fond on the stack. We correctly manipulated the stack but failed to execute the operands pushed back on the stack. So I tweaked the lexer to peek at the top of the stack to see if a operand needed to be executed.