Mercurial > hg > index.cgi
diff lwbasic/lwbasic.h @ 32:49d608aecc4d
Framework for handling local stack frame and/or variables
author | lost@l-w.ca |
---|---|
date | Thu, 03 Feb 2011 22:00:47 -0700 |
parents | 574931d87abd |
children | 890a8f688889 |
line wrap: on
line diff
--- a/lwbasic/lwbasic.h Thu Feb 03 21:28:24 2011 -0700 +++ b/lwbasic/lwbasic.h Thu Feb 03 22:00:47 2011 -0700 @@ -28,6 +28,8 @@ #include <stdint.h> +#include "symtab.h" + /* note: integer and uinteger will be the same for positive values from 0 through 0x7FFFFFFF; the unsigned type should be used for doing ascii conversions and then if a negative value was discovered, it should be @@ -57,6 +59,10 @@ void *input_state; char *currentsub; + symtab_t *global_syms; + symtab_t *local_syms; + int returntype; + int framesize; } cstate; /* parser states */ @@ -87,6 +93,15 @@ token_eof /* end of file */ }; +/* symbol types */ +enum +{ + symtype_sub, /* "sub" (void function) */ + symtype_func, /* function (nonvoid) */ + symtype_param, /* function parameter */ + symtype_var /* variable */ +}; + #ifndef __input_c_seen__ extern int input_getchar(cstate *state); #endif @@ -101,8 +116,8 @@ #endif #ifndef __emit_c_seen__ -extern void emit_prolog(cstate *state, int vis, int framesize); -extern void emit_epilog(cstate *state, int framesize); +extern void emit_prolog(cstate *state, int vis); +extern void emit_epilog(cstate *state); #endif