Not sure how to make it test things yet with Docker, etc., but this all works so far!
This assumes that the book has been followed entirely plus the following implementation details on top of what the book says (otherwise it's just impossible):
More advances parsing of strings (I made it a requirement that it's JSON parsable)
A builtin is_null function that returns true if the value is null.
A builtin object_set(obj, key, value) function that changes or adds the value associated with a key.
A builtin char_at(string, position) function that returns the character at an index of the string.
Reassignation of variables in the closest scope using ident = value;
Probably more to come.
Loops were implemented recursively and will probably cause stack overflows for larger input strings. But some tricks could be applied by unrolling them.
Not sure how to make it test things yet with Docker, etc., but this all works so far!
This assumes that the book has been followed entirely plus the following implementation details on top of what the book says (otherwise it's just impossible):
is_null
function that returns true if the value is null.object_set(obj, key, value)
function that changes or adds the value associated with a key.char_at(string, position)
function that returns the character at an index of the string.ident = value;
Probably more to come.
Loops were implemented recursively and will probably cause stack overflows for larger input strings. But some tricks could be applied by unrolling them.