Added #region / #endregion handling.

This commit is contained in:
MaxED 2016-02-02 14:20:55 +03:00
parent 0f40a7aebe
commit 4c10065b3b
3 changed files with 8 additions and 0 deletions

View file

@ -520,6 +520,10 @@ static void Outside(void)
}
TK_NextToken();
break;
case TK_REGION: // [mxd]
case TK_ENDREGION:
TK_SkipLine();
break;
default:
ERR_Error(ERR_INVALID_DIRECTIVE, YES);
TK_SkipLine();

View file

@ -197,6 +197,8 @@ static struct keyword_s
{ "static", TK_STATIC },
{ "strparam", TK_STRPARAM_EVAL }, // [FDARI]
{ "strcpy", TK_STRCPY }, // [FDARI]
{ "region", TK_REGION }, // [mxd]
{ "endregion", TK_ENDREGION }, // [mxd]
};
#define NUM_KEYWORDS (sizeof(Keywords)/sizeof(Keywords[0]))

View file

@ -132,6 +132,8 @@ typedef enum
TK_RSASSIGN, // '>>='
TK_STRPARAM_EVAL, // 'strparam'
TK_STRCPY, // 'strcpy'
TK_REGION, // 'region' [mxd]
TK_ENDREGION, // 'endregion' [mxd]
} tokenType_t;
// PUBLIC FUNCTION PROTOTYPES ----------------------------------------------