The priority type then set priority reflect this the token string
734 11. ADVANCED VM CONCEPTS AND ISSUES
// It can only be found once, so make sure you
// haven't already found it
if ( g_iIsSetPriorityFound )
ExitOnCodeError ( ERROR_MSSG_MULTIPLE_SETPRIORITIES );// Determine the parameter type
GetNextToken ();
switch ( g_Lexer.CurrToken )
{
// An integer lexeme means the user is
// defining a specific priority
case TOKEN_TYPE_INT:
// Convert the lexeme to an integer value from its string // representation and store it in the script header g_ScriptHeader.iUserPriority = atoi ( GetCurrLexeme () ); // Set the user priority flag
g_ScriptHeader.iStackSize = PRIORITY_USER;
break;
// Anything else should cause an error
default:
ExitOnCodeError ( ERROR_MSSG_INVALID_PRIORITY ); }// Mark the presence of SetStackSize for future encounters g_iIsSetPriorityFound = TRUE;
The parsing logic completes by setting the g_iIsSetPriorityFound flag.
Updating the XVM