added more compiler code
This commit is contained in:
parent
008c74666d
commit
bb3b6c4270
605
stix/lib/comp.c
605
stix/lib/comp.c
File diff suppressed because it is too large
Load Diff
@ -232,8 +232,6 @@ static char* syntax_error_msg[] =
|
|||||||
"integer expected",
|
"integer expected",
|
||||||
"primitive: expected",
|
"primitive: expected",
|
||||||
"wrong directive",
|
"wrong directive",
|
||||||
"wrong class modifier",
|
|
||||||
"duplicate class modifier",
|
|
||||||
"undefined class",
|
"undefined class",
|
||||||
"duplicate class",
|
"duplicate class",
|
||||||
"#dcl not allowed",
|
"#dcl not allowed",
|
||||||
|
@ -277,12 +277,10 @@ enum stix_synerrnum_t
|
|||||||
STIX_SYNERR_INTEGER, /* integer expected */
|
STIX_SYNERR_INTEGER, /* integer expected */
|
||||||
STIX_SYNERR_PRIMITIVE, /* primitive: expected */
|
STIX_SYNERR_PRIMITIVE, /* primitive: expected */
|
||||||
STIX_SYNERR_DIRECTIVE, /* wrong directive */
|
STIX_SYNERR_DIRECTIVE, /* wrong directive */
|
||||||
STIX_SYNERR_CLASSMOD, /* wrong class modifier */
|
|
||||||
STIX_SYNERR_CLASSMODDUP, /* duplicate class modifier */
|
|
||||||
STIX_SYNERR_CLASSUNDEF, /* undefined class */
|
STIX_SYNERR_CLASSUNDEF, /* undefined class */
|
||||||
STIX_SYNERR_CLASSDUP, /* duplicate class */
|
STIX_SYNERR_CLASSDUP, /* duplicate class */
|
||||||
STIX_SYNERR_DCLBANNED, /* #dcl not allowed */
|
STIX_SYNERR_DCLBANNED, /* #dcl not allowed */
|
||||||
STIX_SYNERR_FUNNAME, /* wrong function name */
|
STIX_SYNERR_MTHNAME, /* wrong function name */
|
||||||
STIX_SYNERR_ARGNAMEDUP, /* duplicate argument name */
|
STIX_SYNERR_ARGNAMEDUP, /* duplicate argument name */
|
||||||
STIX_SYNERR_TMPRNAMEDUP, /* duplicate temporary variable name */
|
STIX_SYNERR_TMPRNAMEDUP, /* duplicate temporary variable name */
|
||||||
STIX_SYNERR_VARNAMEDUP /* duplicate variable name */
|
STIX_SYNERR_VARNAMEDUP /* duplicate variable name */
|
||||||
@ -526,9 +524,12 @@ struct stix_compiler_t
|
|||||||
stix_ucs_t vars[3];
|
stix_ucs_t vars[3];
|
||||||
stix_size_t vars_capa[3];
|
stix_size_t vars_capa[3];
|
||||||
|
|
||||||
/* var_count, unlike vars above, includes superclass counts as well.*/
|
/* var_count, unlike vars above, includes superclass counts as well.
|
||||||
|
* var_count[0] - number of named instance variables
|
||||||
|
* var_count[1] - number of class variables
|
||||||
|
* var_count[2] - number of class instance variables */
|
||||||
stix_size_t var_count[3];
|
stix_size_t var_count[3];
|
||||||
} _class;
|
} cls;
|
||||||
|
|
||||||
/* information about a function being comipled */
|
/* information about a function being comipled */
|
||||||
struct
|
struct
|
||||||
@ -552,7 +553,7 @@ struct stix_compiler_t
|
|||||||
|
|
||||||
stix_code_t code;
|
stix_code_t code;
|
||||||
stix_size_t code_capa;
|
stix_size_t code_capa;
|
||||||
} fun;
|
} mth;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -503,9 +503,12 @@ struct stix_class_t
|
|||||||
stix_oop_t subclasses; /* Array of subclasses */
|
stix_oop_t subclasses; /* Array of subclasses */
|
||||||
|
|
||||||
stix_oop_char_t name; /* Symbol */
|
stix_oop_char_t name; /* Symbol */
|
||||||
|
|
||||||
|
/* == NEVER CHANGE THIS ORDER OF 3 ITEMS BELOW == */
|
||||||
stix_oop_char_t instvars; /* String */
|
stix_oop_char_t instvars; /* String */
|
||||||
stix_oop_char_t classvars; /* String */
|
stix_oop_char_t classvars; /* String */
|
||||||
stix_oop_char_t classinstvars; /* String */
|
stix_oop_char_t classinstvars; /* String */
|
||||||
|
/* == NEVER CHANGE THE ORDER OF 3 ITEMS ABOVE == */
|
||||||
|
|
||||||
stix_oop_oop_t instfuns; /* instance methods, MethodDictionary */
|
stix_oop_oop_t instfuns; /* instance methods, MethodDictionary */
|
||||||
stix_oop_oop_t classfuns; /* class methods, MethodDictionary */
|
stix_oop_oop_t classfuns; /* class methods, MethodDictionary */
|
||||||
|
Loading…
Reference in New Issue
Block a user