Interpreter typing in C
Posted
by typus
on Stack Overflow
See other posts from Stack Overflow
or by typus
Published on 2010-05-29T10:03:38Z
Indexed on
2010/05/29
10:12 UTC
Read the original article
Hit count: 200
I'm developing an interpreter and I have some questions to it.
I recently saw a small C interpreter that used a very simple struct like the below for all its objects/values in the language:
struct Object
{
ubyte type;
ubyte value;
};
This struct can hold strings, integers, bools and lists (I think) used in the language the interpreter is working with.
- How can you get this Object struct to hold all these types?
© Stack Overflow or respective owner