mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
Revert "Add "support" for user string variables in DECORATE"
- This reverts commit c90a1c0c96
.
- DECORATE looks to be very dependant on functions that take strings as
parameters receiving those strings as constants and not as expressions,
so being able to declare string variables with DECORATE is pretty much
useless.
This commit is contained in:
parent
c90a1c0c96
commit
17972b5d06
1 changed files with 3 additions and 8 deletions
|
@ -533,17 +533,12 @@ static void ParseUserVariable (FScanner &sc, PSymbolTable *symt, PClassActor *cl
|
||||||
|
|
||||||
// Read the type and make sure it's acceptable.
|
// Read the type and make sure it's acceptable.
|
||||||
sc.MustGetAnyToken();
|
sc.MustGetAnyToken();
|
||||||
switch (sc.TokenType)
|
if (sc.TokenType != TK_Int && sc.TokenType != TK_Float)
|
||||||
{
|
{
|
||||||
case TK_Int: type = TypeSInt32; break;
|
sc.ScriptMessage("User variables must be of type 'int' or 'float'");
|
||||||
case TK_Float: type = TypeFloat64; break;
|
|
||||||
case TK_String: type = TypeString; break;
|
|
||||||
default:
|
|
||||||
type = TypeError;
|
|
||||||
sc.ScriptMessage("User variables must be of type 'int' or 'float' or 'string'");
|
|
||||||
FScriptPosition::ErrorCounter++;
|
FScriptPosition::ErrorCounter++;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
type = sc.TokenType == TK_Int ? (PType *)TypeSInt32 : (PType *)TypeFloat64;
|
||||||
|
|
||||||
sc.MustGetToken(TK_Identifier);
|
sc.MustGetToken(TK_Identifier);
|
||||||
// For now, restrict user variables to those that begin with "user_" to guarantee
|
// For now, restrict user variables to those that begin with "user_" to guarantee
|
||||||
|
|
Loading…
Reference in a new issue