mirror of
https://github.com/ZDoom/acc.git
synced 2025-02-14 07:30:56 +00:00
Merge branch 'master' of https://github.com/rheit/acc
This commit is contained in:
commit
bc4e0d6d1c
4 changed files with 23 additions and 1 deletions
18
parse.c
18
parse.c
|
@ -2526,10 +2526,12 @@ static void LeadingHudMessage(void)
|
||||||
// arglist: arg | arglist arg
|
// arglist: arg | arglist arg
|
||||||
// arg: range = replacement
|
// arg: range = replacement
|
||||||
// range: exp : exp
|
// range: exp : exp
|
||||||
// replacement: palrep | colorrep
|
// replacement: palrep | colorrep | desatrep | colouriserep | tintrep
|
||||||
// palrep: exp : exp
|
// palrep: exp : exp
|
||||||
// colorrep: [exp,exp,exp]:[exp,exp,exp]
|
// colorrep: [exp,exp,exp]:[exp,exp,exp]
|
||||||
// desatrep: %colorrep
|
// desatrep: %colorrep
|
||||||
|
// colouriserep: #[exp,exp,exp]
|
||||||
|
// tintrep: @exp[exp,exp,exp]
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
static void LeadingCreateTranslation(void)
|
static void LeadingCreateTranslation(void)
|
||||||
|
@ -2556,6 +2558,18 @@ static void LeadingCreateTranslation(void)
|
||||||
translationcode = PCD_TRANSLATIONRANGE3;
|
translationcode = PCD_TRANSLATIONRANGE3;
|
||||||
TK_NextTokenMustBe(TK_LBRACKET, ERR_MISSING_LBRACKET);
|
TK_NextTokenMustBe(TK_LBRACKET, ERR_MISSING_LBRACKET);
|
||||||
}
|
}
|
||||||
|
else if (tk_Token == TK_NUMBERSIGN)
|
||||||
|
{
|
||||||
|
translationcode = PCD_TRANSLATIONRANGE4;
|
||||||
|
TK_NextTokenMustBe(TK_LBRACKET, ERR_MISSING_LBRACKET);
|
||||||
|
}
|
||||||
|
else if (tk_Token == TK_ATSIGN)
|
||||||
|
{
|
||||||
|
translationcode = PCD_TRANSLATIONRANGE5;
|
||||||
|
TK_NextToken();
|
||||||
|
EvalExpression();
|
||||||
|
TK_TokenMustBe(TK_LBRACKET, ERR_MISSING_LBRACKET);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
translationcode = PCD_TRANSLATIONRANGE2;
|
translationcode = PCD_TRANSLATIONRANGE2;
|
||||||
|
@ -2581,6 +2595,8 @@ static void LeadingCreateTranslation(void)
|
||||||
}
|
}
|
||||||
TK_NextToken();
|
TK_NextToken();
|
||||||
}
|
}
|
||||||
|
if (translationcode == PCD_TRANSLATIONRANGE4 || translationcode == PCD_TRANSLATIONRANGE5)
|
||||||
|
break;
|
||||||
if(j == 2)
|
if(j == 2)
|
||||||
{
|
{
|
||||||
TK_TokenMustBe(TK_COLON, ERR_MISSING_COLON);
|
TK_TokenMustBe(TK_COLON, ERR_MISSING_COLON);
|
||||||
|
|
2
pcode.h
2
pcode.h
|
@ -448,6 +448,8 @@ typedef enum
|
||||||
PCD_STRCPYTOSCRIPTCHRANGE,
|
PCD_STRCPYTOSCRIPTCHRANGE,
|
||||||
PCD_LSPEC5EX,
|
PCD_LSPEC5EX,
|
||||||
PCD_LSPEC5EXRESULT,
|
PCD_LSPEC5EXRESULT,
|
||||||
|
PCD_TRANSLATIONRANGE4,
|
||||||
|
PCD_TRANSLATIONRANGE5,
|
||||||
|
|
||||||
PCODE_COMMAND_COUNT
|
PCODE_COMMAND_COUNT
|
||||||
} pcd_t;
|
} pcd_t;
|
||||||
|
|
3
token.c
3
token.c
|
@ -1342,6 +1342,9 @@ static void ProcessSpecialToken(void)
|
||||||
case '#':
|
case '#':
|
||||||
tk_Token = TK_NUMBERSIGN;
|
tk_Token = TK_NUMBERSIGN;
|
||||||
break;
|
break;
|
||||||
|
case '@':
|
||||||
|
tk_Token = TK_ATSIGN;
|
||||||
|
break;
|
||||||
case '^':
|
case '^':
|
||||||
if(Chr == '=')
|
if(Chr == '=')
|
||||||
{
|
{
|
||||||
|
|
1
token.h
1
token.h
|
@ -136,6 +136,7 @@ typedef enum
|
||||||
TK_ENDREGION, // 'endregion' [mxd]
|
TK_ENDREGION, // 'endregion' [mxd]
|
||||||
TK_KILL, // 'kill' [JM]
|
TK_KILL, // 'kill' [JM]
|
||||||
TK_REOPEN, // 'reopen' [Nash]
|
TK_REOPEN, // 'reopen' [Nash]
|
||||||
|
TK_ATSIGN, // '@'
|
||||||
} tokenType_t;
|
} tokenType_t;
|
||||||
|
|
||||||
// PUBLIC FUNCTION PROTOTYPES ----------------------------------------------
|
// PUBLIC FUNCTION PROTOTYPES ----------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue