#[repr(i32)]pub enum CompilerErrorCode {
Show 119 variants
UnexpectedCharacter = -560,
FatalCompilerError = -561,
ProgramCompoundStatementAtStart = -562,
UnexpectedEndCompoundStatement = -563,
AfterCompoundStatementAtEnd = -564,
ParsingVariableList = -565,
UnknownStateInCompiler = -566,
InvalidDeclarationType = -567,
NoLeftBracketOnExpression = -568,
NoRightBracketOnExpression = -569,
BadStartOfStatement = -570,
NoLeftBracketOnArgList = -571,
NoRightBracketOnArgList = -572,
NoSemicolonAfterExpression = -573,
ParsingAssignmentStatement = -574,
BadLValue = -575,
BadConstantType = -576,
IdentifierListFull = -577,
NonIntegerIdForIntegerConstant = -578,
NonFloatIdForFloatConstant = -579,
NonStringIdForStringConstant = -580,
VariableAlreadyUsedWithinScope = -581,
VariableDefinedWithoutType = -582,
IncorrectVariableStateLeftOnStack = -583,
NonIntegerExpressionWhereIntegerRequired = -584,
VoidExpressionWhereNonVoidRequired = -585,
InvalidParametersForAssignment = -586,
DeclarationDoesNotMatchParameters = -587,
LogicalOperationHasInvalidOperands = -588,
EqualityTestHasInvalidOperands = -589,
ComparisonTestHasInvalidOperands = -590,
ShiftOperationHasInvalidOperands = -591,
ArithmeticOperationHasInvalidOperands = -592,
UnknownOperationInSemanticCheck = -593,
ScriptTooLarge = -594,
ReturnStatementHasNoParameters = -595,
NoWhileAfterDoKeyword = -596,
FunctionDefinitionMissingName = -597,
FunctionDefinitionMissingParameterList = -598,
MalformedParameterList = -599,
BadTypeSpecifier = -600,
NoSemicolonAfterStructure = -601,
EllipsisInIdentifier = -602,
FileNotFound = -603,
IncludeRecursive = -604,
IncludeTooManyLevels = -605,
ParsingReturnStatement = -606,
ParsingIdentifierList = -607,
ParsingFunctionDeclaration = -608,
DuplicateFunctionImplementation = -609,
TokenTooLong = -610,
UndefinedStructure = -611,
LeftOfStructurePartNotStructure = -612,
RightOfStructurePartNotFieldInStructure = -613,
UndefinedFieldInStructure = -614,
StructureRedefined = -615,
VariableUsedTwiceInSameStructure = -616,
FunctionImplementationAndDefinitionDiffer = -617,
MismatchedTypes = -618,
IntegerNotAtTopOfStack = -619,
ReturnTypeAndFunctionTypeMismatched = -620,
NotAllControlPathsReturnAValue = -621,
UndefinedIdentifier = -622,
NoFunctionMainInScript = -623,
FunctionMainMustHaveVoidReturnValue = -624,
FunctionMainMustHaveNoParameters = -625,
NonVoidFunctionCannotBeAStatement = -626,
BadVariableName = -627,
NonOptionalParameterCannotFollowOptionalParameter = -628,
TypeDoesNotHaveAnOptionalParameter = -629,
NonConstantInFunctionDeclaration = -630,
ParsingConstantVector = -631,
OperandMustBeAnIntegerLValue = -1_594,
ConditionalRequiresSecondExpression = -1_595,
ConditionalMustHaveMatchingReturnTypes = -1_596,
MultipleDefaultStatementsWithinSwitch = -1_597,
MultipleCaseConstantStatementsWithinSwitch = -1_598,
CaseParameterNotAConstantInteger = -1_599,
SwitchMustEvaluateToAnInteger = -1_600,
NoColonAfterDefaultLabel = -1_601,
NoColonAfterCaseLabel = -1_602,
NoSemicolonAfterStatement = -1_603,
BreakOutsideOfLoopOrCaseStatement = -4_834,
TooManyParametersOnFunction = -4_835,
UnableToOpenFileForWriting = -4_836,
UnterminatedStringConstant = -4_855,
NoFunctionIntscInScript = -5_182,
FunctionIntscMustHaveVoidReturnValue = -5_183,
FunctionIntscMustHaveNoParameters = -5_184,
JumpingOverDeclarationStatementsCaseDisallowed = -6_804,
JumpingOverDeclarationStatementsDefaultDisallowed = -6_805,
ElseWithoutCorrespondingIf = -6_823,
IfConditionCannotBeFollowedByANullStatement = -10_407,
InvalidTypeForConstKeyword = -3_741,
ConstKeywordCannotBeUsedOnNonGlobalVariables = -3_742,
InvalidValueAssignedToConstant = -3_752,
SwitchConditionCannotBeFollowedByANullStatement = -9_081,
WhileConditionCannotBeFollowedByANullStatement = -9_082,
ForStatementCannotBeFollowedByANullStatement = -9_083,
CannotIncludeThisFileTwice = -9_155,
ElseCannotBeFollowedByANullStatement = -40_104,
VmTooManyInstructions = -632,
VmTooManyLevelsOfRecursion = -633,
VmFileNotOpened = -634,
VmFileNotCompiledSuccessfully = -635,
VmInvalidAuxCode = -636,
VmNullVirtualMachineNode = -637,
VmStackOverflow = -638,
VmStackUnderflow = -639,
VmInvalidOpCode = -640,
VmInvalidExtraDataOnOpCode = -641,
VmInvalidCommand = -642,
VmFakeShortcutLogicalOperation = -643,
VmDivideByZero = -644,
VmFakeAbortScript = -645,
VmIpOutOfCodeSegment = -646,
VmCommandImplementerNotSet = -647,
VmUnknownTypeOnRunTimeStack = -648,
AlreadyPrinted = -1,
}Expand description
Stable compiler and VM error codes used by the upstream NWScript compiler.
Variants§
UnexpectedCharacter = -560
An unexpected character was encountered during lexing.
FatalCompilerError = -561
The compiler reported a fatal internal error.
ProgramCompoundStatementAtStart = -562
Parsing expected a compound statement at program start.
UnexpectedEndCompoundStatement = -563
A closing brace appeared without a matching opening brace.
AfterCompoundStatementAtEnd = -564
Unexpected tokens appeared after a compound statement.
ParsingVariableList = -565
Parsing a variable list failed.
UnknownStateInCompiler = -566
The compiler entered an unexpected internal state.
InvalidDeclarationType = -567
A declaration used an invalid type.
NoLeftBracketOnExpression = -568
An expression was missing (.
NoRightBracketOnExpression = -569
An expression was missing ).
BadStartOfStatement = -570
A statement started with an invalid token.
NoLeftBracketOnArgList = -571
A call argument list was missing (.
NoRightBracketOnArgList = -572
A call argument list was missing ).
NoSemicolonAfterExpression = -573
An expression statement was missing a semicolon.
ParsingAssignmentStatement = -574
Parsing an assignment statement failed.
BadLValue = -575
The assignment target was invalid.
BadConstantType = -576
A constant literal had an invalid type.
IdentifierListFull = -577
The identifier table is full.
NonIntegerIdForIntegerConstant = -578
An integer constant referenced a non-integer identifier.
NonFloatIdForFloatConstant = -579
A float constant referenced a non-float identifier.
NonStringIdForStringConstant = -580
A string constant referenced a non-string identifier.
VariableAlreadyUsedWithinScope = -581
A variable name was reused within the same scope.
VariableDefinedWithoutType = -582
A variable was defined without a type.
IncorrectVariableStateLeftOnStack = -583
The compile stack ended in an invalid variable state.
NonIntegerExpressionWhereIntegerRequired = -584
An integer expression was required.
VoidExpressionWhereNonVoidRequired = -585
A non-void expression was required.
InvalidParametersForAssignment = -586
Assignment parameters were invalid.
DeclarationDoesNotMatchParameters = -587
A declaration did not match its parameter list.
LogicalOperationHasInvalidOperands = -588
A logical operation used invalid operands.
EqualityTestHasInvalidOperands = -589
An equality test used invalid operands.
ComparisonTestHasInvalidOperands = -590
A comparison test used invalid operands.
ShiftOperationHasInvalidOperands = -591
A shift operation used invalid operands.
ArithmeticOperationHasInvalidOperands = -592
An arithmetic operation used invalid operands.
UnknownOperationInSemanticCheck = -593
The semantic checker saw an unknown operation.
ScriptTooLarge = -594
The compiled script exceeded the maximum supported size.
ReturnStatementHasNoParameters = -595
A return statement was missing its return value.
NoWhileAfterDoKeyword = -596
do was not followed by while.
FunctionDefinitionMissingName = -597
A function definition was missing its name.
FunctionDefinitionMissingParameterList = -598
A function definition was missing its parameter list.
MalformedParameterList = -599
A parameter list was malformed.
BadTypeSpecifier = -600
A type specifier was invalid.
NoSemicolonAfterStructure = -601
A struct declaration was missing a semicolon.
EllipsisInIdentifier = -602
An ellipsis-like construct appeared in an identifier.
FileNotFound = -603
A requested source file could not be found.
IncludeRecursive = -604
A recursive include was detected.
IncludeTooManyLevels = -605
Too many include levels were used.
ParsingReturnStatement = -606
Parsing a return statement failed.
ParsingIdentifierList = -607
Parsing the identifier list failed.
ParsingFunctionDeclaration = -608
Parsing a function declaration failed.
DuplicateFunctionImplementation = -609
A function implementation was defined more than once.
TokenTooLong = -610
A token exceeded the maximum allowed length.
UndefinedStructure = -611
A referenced struct type was undefined.
LeftOfStructurePartNotStructure = -612
The left side of a field access was not a structure.
RightOfStructurePartNotFieldInStructure = -613
The right side of a field access was not a valid field.
UndefinedFieldInStructure = -614
A referenced struct field was undefined.
StructureRedefined = -615
A struct was redefined.
VariableUsedTwiceInSameStructure = -616
A field name was reused within the same structure.
FunctionImplementationAndDefinitionDiffer = -617
A function implementation disagreed with its declaration.
MismatchedTypes = -618
Two types were incompatible.
IntegerNotAtTopOfStack = -619
The top of stack was not an integer when required.
ReturnTypeAndFunctionTypeMismatched = -620
A function return type and returned expression type disagreed.
NotAllControlPathsReturnAValue = -621
Not all control paths return a value.
UndefinedIdentifier = -622
An identifier was undefined.
NoFunctionMainInScript = -623
The script did not define main.
FunctionMainMustHaveVoidReturnValue = -624
main must return void.
FunctionMainMustHaveNoParameters = -625
main must not take parameters.
NonVoidFunctionCannotBeAStatement = -626
A non-void function call was used as a statement.
BadVariableName = -627
A variable name was invalid.
NonOptionalParameterCannotFollowOptionalParameter = -628
A required parameter followed an optional one.
TypeDoesNotHaveAnOptionalParameter = -629
A type does not support optional parameters.
NonConstantInFunctionDeclaration = -630
A function declaration used a non-constant default value.
ParsingConstantVector = -631
Parsing a constant vector failed.
OperandMustBeAnIntegerLValue = -1_594
An operand needed to be an integer lvalue.
ConditionalRequiresSecondExpression = -1_595
A conditional expression was missing its second expression.
ConditionalMustHaveMatchingReturnTypes = -1_596
Both arms of a conditional expression must agree on type.
MultipleDefaultStatementsWithinSwitch = -1_597
Multiple default labels appeared in one switch.
MultipleCaseConstantStatementsWithinSwitch = -1_598
The same case value appeared more than once in one switch.
CaseParameterNotAConstantInteger = -1_599
A case value was not a constant integer.
SwitchMustEvaluateToAnInteger = -1_600
A switch expression must evaluate to an integer.
NoColonAfterDefaultLabel = -1_601
A default label was missing its colon.
NoColonAfterCaseLabel = -1_602
A case label was missing its colon.
NoSemicolonAfterStatement = -1_603
A statement was missing its semicolon.
BreakOutsideOfLoopOrCaseStatement = -4_834
break was used outside a loop or switch case.
TooManyParametersOnFunction = -4_835
A function exceeded the maximum number of parameters.
UnableToOpenFileForWriting = -4_836
An output file could not be written.
UnterminatedStringConstant = -4_855
A string literal was unterminated.
NoFunctionIntscInScript = -5_182
The script did not define the conditional entry function.
FunctionIntscMustHaveVoidReturnValue = -5_183
The conditional entry function must return void.
FunctionIntscMustHaveNoParameters = -5_184
The conditional entry function must not take parameters.
JumpingOverDeclarationStatementsCaseDisallowed = -6_804
A case jump would cross declarations illegally.
JumpingOverDeclarationStatementsDefaultDisallowed = -6_805
A default jump would cross declarations illegally.
ElseWithoutCorrespondingIf = -6_823
else appeared without a matching if.
IfConditionCannotBeFollowedByANullStatement = -10_407
An if condition cannot be followed by an empty statement.
InvalidTypeForConstKeyword = -3_741
const was used with an invalid type.
ConstKeywordCannotBeUsedOnNonGlobalVariables = -3_742
const cannot be used on non-global variables.
InvalidValueAssignedToConstant = -3_752
A constant declaration used an invalid assigned value.
SwitchConditionCannotBeFollowedByANullStatement = -9_081
A switch condition cannot be followed by an empty statement.
WhileConditionCannotBeFollowedByANullStatement = -9_082
A while condition cannot be followed by an empty statement.
ForStatementCannotBeFollowedByANullStatement = -9_083
A for statement cannot be followed by an empty statement.
CannotIncludeThisFileTwice = -9_155
The same file cannot be included twice.
ElseCannotBeFollowedByANullStatement = -40_104
else cannot be followed by an empty statement.
VmTooManyInstructions = -632
The VM exceeded its instruction limit.
VmTooManyLevelsOfRecursion = -633
The VM exceeded its recursion limit.
VmFileNotOpened = -634
The VM could not open a script file.
VmFileNotCompiledSuccessfully = -635
The VM was asked to run an uncompiled file.
VmInvalidAuxCode = -636
The VM encountered an invalid aux code.
VmNullVirtualMachineNode = -637
The VM encountered a null node.
VmStackOverflow = -638
The VM stack overflowed.
VmStackUnderflow = -639
The VM stack underflowed.
VmInvalidOpCode = -640
The VM encountered an invalid opcode.
VmInvalidExtraDataOnOpCode = -641
The VM encountered invalid extra data for an opcode.
VmInvalidCommand = -642
The VM encountered an invalid command id.
VmFakeShortcutLogicalOperation = -643
The VM hit a fake shortcut logical operation.
VmDivideByZero = -644
The VM attempted division by zero.
VmFakeAbortScript = -645
The VM received a fake abort request.
VmIpOutOfCodeSegment = -646
The VM instruction pointer left the code segment.
VmCommandImplementerNotSet = -647
The VM command implementer was not configured.
VmUnknownTypeOnRunTimeStack = -648
The VM encountered an unknown stack value type.
AlreadyPrinted = -1
The underlying error has already been emitted.
Implementations§
Trait Implementations§
Source§impl Clone for CompilerErrorCode
impl Clone for CompilerErrorCode
Source§fn clone(&self) -> CompilerErrorCode
fn clone(&self) -> CompilerErrorCode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CompilerErrorCode
impl Debug for CompilerErrorCode
Source§impl<'de> Deserialize<'de> for CompilerErrorCode
impl<'de> Deserialize<'de> for CompilerErrorCode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for CompilerErrorCode
impl Hash for CompilerErrorCode
Source§impl PartialEq for CompilerErrorCode
impl PartialEq for CompilerErrorCode
Source§impl Serialize for CompilerErrorCode
impl Serialize for CompilerErrorCode
Source§impl TryFrom<i32> for CompilerErrorCode
impl TryFrom<i32> for CompilerErrorCode
impl Copy for CompilerErrorCode
impl Eq for CompilerErrorCode
impl StructuralPartialEq for CompilerErrorCode
Auto Trait Implementations§
impl Freeze for CompilerErrorCode
impl RefUnwindSafe for CompilerErrorCode
impl Send for CompilerErrorCode
impl Sync for CompilerErrorCode
impl Unpin for CompilerErrorCode
impl UnsafeUnpin for CompilerErrorCode
impl UnwindSafe for CompilerErrorCode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.