Add bytecode generator

This commit is contained in:
Ilmir Usmanov
2014-07-15 19:32:26 +04:00
parent 25ad63c9be
commit 0647cdd4f1
15 changed files with 467 additions and 151 deletions
+8 -2
View File
@@ -18,6 +18,8 @@
#include "globals.h"
typedef uint8_t string_id;
/* Keywords. */
typedef enum
{
@@ -141,11 +143,11 @@ typedef struct
{
void *none;
keyword kw;
const char *name;
string_id name;
bool is_true;
int num;
float fp_num;
const char *str;
string_id str;
}
data;
}
@@ -161,4 +163,8 @@ void lexer_save_token (token);
void lexer_dump_buffer_state (void);
uint8_t lexer_get_strings (const char **);
const char *lexer_get_string_by_id (string_id id);
#endif