I am developing an interpreter, and I have some questions for it.
I recently saw a small C interpreter that used a very simple structure, as shown below for all of its objects / values ββin the language:
struct Object
{
ubyte type;
ubyte value;
};
This structure can contain strings, integers, bools and lists (I think) used in the language the interpreter works with.
- How can you get this Object structure to hold all of these types?
typus source
share