Types in Shrubbery Designer are also lexically defined. Objects are basically stored as strings to create a heterogenous type that can be stored and transformed to a POD type when needed. The format of the underlying string determines the type. A number (double) would be defined as starting with a numerical character and containing only numbers or a ., e.g. "12.5".
Lists start with "(","{", or "[" and ends with ")","}" or "]". By making all the paranthesis mean the same, when reading a c, c++ or Java type language, all the different parts will be lists and sublists. This creates a syntax tree that can be traversed and manipulated as a LISP tree structure.
Everything that is not a number or a list delimeter will be a symbol. For instance "HELLO","#","One_1" etc.
Additionally an object that starts with a '"' is defined as a string. Strings are required to capture anything with a white space in it. The string "Hello World !" is different from Hello World !, which would be three different tokens, while the first string would be only one string.
Here is a quick visual guide to the built in functions, i.e. commands, in the LISP intepreter. The diagrams are generated by Shrubbery Designer running inside the corresponding unit test that verifies the function of the command.
So we get test and visualisation of the command at the same time. Each unit test also contains one or more asserts that verify that the result of the command is as expected. Those are not shown here.
Numeric values and strings evaluate to themselves.