
Internals of @sugarpine (1/6): Here the debugger parses the input and the type checker states no such overload is there for the given operation.

Internals of @sugarpine (2/6): However, when the overload is found, compiler is able to fully generated the typed AST.

Internals of @sugarpine (3/6): Internals of the system had a really beautiful structure. Here you could define the arguments it took and their types. The reason for this design is that these are named parameters in the Pine Script and therefore they could have any precedence.

Internals of @sugarpine (4/6): And doing so you could even have union types.

Internals of @sugarpine (5/6): And it was quite simple to define overloads.

Internals of @sugarpine (6/6): And here it was all the overload signatures of the operation addition.