Unkeyword "class", make it contextual.
This commit is contained in:
parent
d2b7126e1d
commit
02b7f42811
@ -395,7 +395,6 @@ enum {
|
||||
tCASE,
|
||||
tCELLSOF,
|
||||
tCHAR,
|
||||
tCLASS,
|
||||
tCONST,
|
||||
tCONTINUE,
|
||||
tDECL,
|
||||
|
@ -1526,12 +1526,17 @@ static void parse(void)
|
||||
case 0:
|
||||
/* ignore zero's */
|
||||
break;
|
||||
case tSYMBOL:
|
||||
if (strcmp(tok.str, "class") == 0) {
|
||||
domethodmap(Layout_Class);
|
||||
break;
|
||||
}
|
||||
// Fallthrough.
|
||||
case tINT:
|
||||
case tOBJECT:
|
||||
case tCHAR:
|
||||
case tVOID:
|
||||
case tLABEL:
|
||||
case tSYMBOL:
|
||||
lexpush();
|
||||
// Fallthrough.
|
||||
case tNEW:
|
||||
@ -1563,9 +1568,6 @@ static void parse(void)
|
||||
case tMETHODMAP:
|
||||
domethodmap(Layout_MethodMap);
|
||||
break;
|
||||
case tCLASS:
|
||||
domethodmap(Layout_Class);
|
||||
break;
|
||||
case '}':
|
||||
error(54); /* unmatched closing brace */
|
||||
break;
|
||||
|
@ -1949,7 +1949,7 @@ char *sc_tokens[] = {
|
||||
"...", "..", "::",
|
||||
"assert",
|
||||
"*begin", "break",
|
||||
"case", "cellsof", "char", "class", "const", "continue",
|
||||
"case", "cellsof", "char", "const", "continue",
|
||||
"decl", "default", "defined", "delete", "do",
|
||||
"else", "*end", "enum", "exit",
|
||||
"for", "forward", "funcenum", "functag", "function",
|
||||
|
7
sourcepawn/compiler/tests/ok-class-arg.sp
Normal file
7
sourcepawn/compiler/tests/ok-class-arg.sp
Normal file
@ -0,0 +1,7 @@
|
||||
f(const char[] class)
|
||||
{
|
||||
}
|
||||
|
||||
public OnPluginStart()
|
||||
{
|
||||
}
|
Loading…
Reference in New Issue
Block a user