Replace symbol proxies with type symbols.
Proxies were rather hacky and complicated, and only existed as a workaround for oddities with constructors. This patch replaces them with actual type symbols, a very tiny step to semantically getting rid of tags. This greatly simplifies how we implement constructors, and paves the way for using methodmap symbols in field expressions. Since non-value symbols are new to spcomp1, we place a rather pigeonholed check into primary() to make sure non-value symbols don't escape into expressions.
This commit is contained in:
@@ -156,7 +156,7 @@ static const char *errmsg[] = {
|
||||
/*110*/ "%s has already been defined (previously seen as %s)\n",
|
||||
/*111*/ "expected identifier - did you forget a type?\n",
|
||||
/*112*/ "constructor function must return tag %s\n",
|
||||
/*113*/ "cannot define constructor for \"%s\"; already exists as a %s\n",
|
||||
/*113*/ "constructor for \"%s\" already exists\n",
|
||||
/*114*/ "missing type, or %s must have the same name as %s \"%s\"\n",
|
||||
/*115*/ "cannot use delete, %s %s has no destructor\n",
|
||||
/*116*/ "no methodmap or class was found for %s\n",
|
||||
@@ -217,6 +217,7 @@ static const char *errmsg[] = {
|
||||
/*171*/ "cannot use 'new' with non-object-like methodmap '%s'\n",
|
||||
/*172*/ "methodmap '%s' does not have a constructor\n",
|
||||
/*173*/ "'%s' is a newly reserved keyword that may be used in the future; use a different name as an identifier\n",
|
||||
/*174*/ "symbol '%s' is a type and cannot be used as a value\n",
|
||||
#else
|
||||
"\315e\306\227\266k\217:\235\277bu\201fo\220\204\223\012",
|
||||
"\202l\224\250s\205g\346\356e\233\201(\243\315\214\267\202) \253 f\255low ea\305 \042c\353e\042\012",
|
||||
|
||||
Reference in New Issue
Block a user