src/Messages.tbl
author Asher Baker <asherkin@gmail.com>
Mon Jun 10 15:52:44 2013 +0100 (2013-06-10)
changeset 265 3a903b89a514
parent 258 241d082d6d89
permissions -rw-r--r--
Fixed type checking for multidimensional arrays.
     1 MSG(UnterminatedComment,            SyntaxError,            "unterminated comment")
     2 MSG(UnexpectedCharacter,            SyntaxError,            "unexpected character '%c' (code %02X)")
     3 MSG(UnterminatedString,             SyntaxError,            "unterminated string")
     4 MSG(UnknownEscapeCode,              SyntaxError,            "unknown escape code '%c'")
     5 MSG(ExpectedDigitForFloat,          SyntaxError,            "expected digit in float literal, got '%c'")
     6 MSG(WrongToken,                     SyntaxError,            "expected token '%s', got '%s'")
     7 MSG(ExpectedExpression,             SyntaxError,            "expected expression, got '%s'")
     8 MSG(RedeclaredName,                 SyntaxError,            "name '%s' was redeclared (previous at line %d, col %d)")
     9 MSG(ExpectedLValue,                 SyntaxError,            "impossible assignment, expected l-value")
    10 MSG(MaximumArrayDepth,              TypeError,              "maximum array dimension depth exceeded")
    11 MSG(ArrayInitializerDepth,          SyntaxError,            "array declaration and initializer have different dimension counts")
    12 MSG(BadArraySize,                   SyntaxError,            "array size must be positive")
    13 MSG(ArraySizeTooBig,                SyntaxError,            "array size is too big")
    14 MSG(EnumFieldNotConstant,           SyntaxError,            "enum fields must be constant integers")
    15 MSG(BreakOutsideLoop,               SyntaxError,            "break occurs outside any loop")
    16 MSG(ContinueOutsideLoop,            SyntaxError,            "continue occurs outside any loop")
    17 MSG(InvalidEnumName,                SyntaxError,            "invalid enumeration name")
    18 MSG(IndexMustBeInteger,             SyntaxError,            "array index must be integer")
    19 MSG(IndexBaseMustBeArray,           SyntaxError,            "cannot index into non-array")
    20 MSG(ArrayIsNotBoolean,              SyntaxError,            "cannot convert an array to boolean")
    21 MSG(CalleeNotFunction,              SyntaxError,            "callee is not a function")
    22 MSG(ArgumentCountMismatch,          SyntaxError,            "argument counts do not match")
    23 MSG(CannotAssignArrayToScalar,      SyntaxError,            "cannot coerce an array to a scalar")
    24 MSG(ArrayDimensionsMismatch,        SyntaxError,            "number of array dimensions does not match")
    25 MSG(ExpectedArray,                  SyntaxError,            "expected array")
    26 MSG(ArrayDimensionSizeMismatch,     SyntaxError,            "array dimension sizes do not match (level %d)")
    27 MSG(ArrayDimensionNotInteger,       SyntaxError,            "array dimension size must be an integer expression")
    28 MSG(ArrayNotSupported,              SyntaxError,            "array declaration not yet supported")
    29 MSG(ArrayInitializerUnknown,        SyntaxError,            "array initialized size is not known")
    30 MSG(DynamicArrayHasInitializer,     SyntaxError,            "dynamic arrays cannot have initializers")
    31 MSG(ArraySizeNotSpecified,          SyntaxError,            "array size was not specified")
    32 MSG(ArraySizeCannotBeDetermined,    SyntaxError,            "array size cannot be determined from initializer")
    33 MSG(ArrayAssignmentTooBig,          SyntaxError,            "destination array is too small")
    34 MSG(CannotDeclareStringCell,        SyntaxError,            "cannot declare a String cell")
    35 MSG(CantOpenFile,                   SyntaxError,            "cannot open file")
    36 MSG(ErrorSeekingFile,               SyntaxError,            "error seeking file")
    37 MSG(ErrorReadingFile,               SyntaxError,            "error reading file")
    38 MSG(ExpectedGlobal,                 SyntaxError,            "expected global variable or function")
    39 MSG(ForwardNotImplemented,          SyntaxError,            "forward '%s' not implemented")
    40 MSG(ForwardDeclareMismatches,       SyntaxError,            "declaration does not match original forward signature")
    41 MSG(ArrayCantBeReference,           TypeError,              "this type cannot be used with a reference")
    42 MSG(ArraySizeMustBeConstant,        SyntaxError,            "array size must be a constant integer")
    43 MSG(MultiArrayInNative,             SyntaxError,            "multidimensional arrays cannot be passed to natives")
    44 MSG(InvalidVarArgs,                 SyntaxError,            "varargs cannot be const or ref")
    45 MSG(VarArgsOutsideNative,           SyntaxError,            "variadic arguments can only be specified on natives")
    46 MSG(ArrayTooBig,                    TypeError,              "array size is too large")
    47 MSG(IntegerDivideByZero,            TypeError,              "integer divide by zero")
    48 MSG(ArrayIndexOutOfBounds,          TypeError,              "array index %d is out of bounds [0, %d)")
    49 MSG(NativeNotBound,                 TypeError,              "attempted to call unbound native \"%s\"")
    50 MSG(AllocationOverflow,             SystemError,            "allocation request overflowed")
    51 MSG(TooMuchRecursion,               SystemError,            "stack overflow: too much recursion")
    52 MSG(MissingReturnValue,             SyntaxError,            "function must return a value")
    53 MSG(NotAllPathsReturnValue,         SyntaxError,            "not all paths through function return a value")
    54 MSG(UsedVoidReturn,                 SyntaxError,            "value returned, but function is void")
    55 MSG(CannotDeclareVoid,              TypeError,              "cannot declare void variables")
    56 MSG(FunctionDoesNotReturnValue,     SyntaxError,            "cannot use the result of a function with no return value")
    57 MSG(IdentifierNotFound,             SyntaxError,            "identifier '%s' could not be found")
    58 MSG(TypeMismatchDuringInvoke,       TypeError,              "incoming type '%s' does not match signature type '%s'")
    59 MSG(CannotInvokeReturnType,         SyntaxError,            "cannot invoke function with return type '%s'")
    60 MSG(IdentifierIsNotAType,           SyntaxError,            "identifier '%s' cannot be used as a type")
    61 MSG(TypeMismatch,                   TypeError,              "type mismatch (expected '%s', got '%s')")
    62 MSG(PropertyNotFound,               TypeError,              "property '%s' not found on type '%s'")
    63 MSG(MustBeConstant,                 SyntaxError,            "default value must be a constant")
    64 MSG(DefaultMustBeLastCase,          SyntaxError,            "the \"default\" case must be the last case in a switch statement")
    65 MSG(OneDefaultPerSwitch,            SyntaxError,            "only one default case is allowed per switch")
    66 MSG(SingleStatementPerCase,         SyntaxError,            "only one statement is allowed per case")
    67 MSG(CaseMustBeConstant,             SyntaxError,            "case expression must be a constant")
    68 MSG(CaseHasSameValue,               SyntaxError,            "case value appears twice in the same switch")
    69 MSG(CaseMustBeInteger,              SyntaxError,            "switch may only operate on integer values")
    70 MSG(StructCantBeEmpty,              SyntaxError,            "struct cannot be declared without any fields")
    71 MSG(CannotInitializeEvalArray,      SyntaxError,            "cannot mix dynamic array sizes and initializers")
    72 MSG(ExpectedStringLiteral,          SyntaxError,            "expected string literal")
    73 MSG(UnexpectedArrayLiteral,         SyntaxError,            "unexpected array literal")
    74 MSG(InvalidDimensionSize,           TypeError,              "invalid size %d for dimension %d")
    75 MSG(CannotComputeIndexRef,          SyntaxError,            "cannot use an array index as a reference")
    76 MSG(BadDynamicInitializer,          SyntaxError,            "dynamic length specified, but preceding array is empty")
    77 MSG(SizeofNeedsArray,               TypeError,              "sizeof requires an array")
    78 MSG(ImportsMustBeFirst,             SyntaxError,            "import statements must come before other statements")
    79 MSG(ImportedNameAlreadyBound,       TypeError,              "imported name has already been bound")
    80 MSG(CannotResolveImport,            TypeError,              "cannot resolve import %s")
    81 MSG(InvalidCoercion,                TypeError,              "cannot coerce type '%s' to type '%s'")
    82 MSG(CannotConstReference,           TypeError,              "constant outparams are not allowed")
    83 MSG(CannotModifyConst,              TypeError,              "cannot change constant value or structure")
    84 MSG(InvalidConstOnFormal,           TypeError,              "const parameters must be arrays or structs")
    85 MSG(InvalidUncheckedCastFrom,       TypeError,              "cannot perform an unchecked cast on type '%s'")
    86 MSG(InvalidUncheckedCastTo,         TypeError,              "cannot perform an unchecked cast to type '%s'")
    87 MSG(InvalidUnaryType,               TypeError,              "operator %s not defined for type '%s'")
    88 MSG(CannotImportPath,               SyntaxError,            "could not find module or import '%s'")
    89 MSG(DuplicateImport,                SyntaxError,            "duplicate import name '%s'")
    90 MSG(InvalidFieldExpression,			TypeError,				"type '%s' does not have any fields")
    91 MSG(PackageDoesNotHaveMember,		TypeError,				"package does not have member '%s' (check imports)")
    92 MSG(ImportWasNeverImported,         TypeError,              "'%s' was never imported")
    93 MSG(FieldNotFound,                  TypeError,              "field '%s' not found")
    94 MSG(BadImportFrom,					TypeError,              "expected '*' or <name>")
    95 MSG(NotFoundInImportable,           TypeError,              "name '%s' was not found in import '%s'")