11namespace Verse {
namespace Vst {
struct Node; } }
33#define VERSE_ENUM_DIAGNOSTICS(v) \
36 v(2000, Warning, WarnSemantic_UnreachableCode, "Unreachable code - previous expression is guaranteed to exit early.") \
37 v(2001, Warning, WarnSemantic_EmptyBlock, "Expected one or more expressions in the code block but it is empty.") \
38 v(2002, Warning, WarnSemantic_VoidFunctionReturningValue, "This function's return type is void, but this return provides value other than false. The return value will be discarded.") \
39 v(2003, Warning, WarnSemantic_ScopeQualifierShouldBeSuper, "Class-scope qualifier (%s:) won't invoke the base-method. Perhaps (super:) was intended.") \
40 v(2004, Warning, WarnSemantic_ScopeQualifierBeyondSuper, "Class-scope qualifier (%s:) won't invoke the base-method. Explicitly calling ancestor-versions of overridden functions beyond the immediate base is not allowed.") \
41 v(2005, Warning, WarnSemantic_CompatibilityRequirementMissing, "") \
42 v(2006, Warning, WarnSemantic_CompatibilityRequirementAmbiguous,"") \
43 v(2007, Warning, WarnSemantic_CompatibilityRequirementType, "") \
44 v(2008, Warning, WarnSemantic_CompatibilityRequirementValue, "") \
45 v(2009, Warning, WarnSemantic_UseOfDeprecatedDefinition, "") \
46 v(2010, Warning, WarnSemantic_EpicPackageTargetingOldVersion, "") \
47 v(2011, Warning, WarnSemantic_DeprecatedFailureOnSetRhs, "This expression in the right operand of 'set ... = ...' can fail, but the meaning of failure here will change in a future version of Verse. " \
48 "To preserve the current meaning of this code in future versions of Verse, you should move the expression that can fail outside the 'set'.\n" \
49 "For example, if you have the expression:\n" \
50 " set Variable = ExpressionThatMightFail[],\n" \
51 "you can change it to the following two expressions to preserve the meaning:\n" \
52 " Value := ExpressionThatMightFail[]\n" \
53 " set Variable = Value") \
54 v(2012, Warning, WarnSemantic_DeprecatedFailureInMapLiteralKey, "This expression in a key of a map literal can fail, but the meaning of failure here will change in a future version of Verse. " \
55 "To preserve the current meaning of this code in future versions of Verse, you should move the expression that can fail outside the 'map' key expression.\n" \
56 "For example, if you have the expression:\n" \
57 " Map := map{ExpressionThatMightFail[] => Value},\n" \
58 "you can change it to the following two expressions to preserve the meaning:\n" \
59 " Key := ExpressionThatMightFail[]\n" \
60 " Map := map{Key => Value}") \
61 v(2013, Warning, WarnSemantic_StricterErrorCheck, "") \
62 v(2015, Warning, WarnSemantic_ReservedFutureIdentifier, "This identifier has been reserved in a future version of Verse. You should rename this identifier.") \
63 v(2016, Warning, WarnSemantic_DeprecatedNonPublicStructField, "Support for non-public struct fields is deprecated, and will become an error in a future version of Verse.") \
64 v(2017, Warning, WarnSemantic_ContainerLookupAlwaysFails, "This container lookup is unlikely to succeed. (Did you mean to use a different key?)") \
65 v(2018, Warning, WarnSemantic_DeprecatedUniqueWithoutAllocates, "") \
66 v(2019, Warning, WarnSemantic_CompatibilityRequirementNewFieldInStruct,"") \
67 v(2100, Warning, WarnSystem_CannotReadPackage, "Error reading text file") \
68 v(2200, Warning, WarnProject_EmptyProject, "Project contains no code.") \
69 v(2300, Warning, WarnParser_CommentsAreNotContentInStrings, "Comments will not be considered part of a string literal's contents in a future version of Verse. To preserve this current behaviour, you can wrap your inline comment with curly braces (e.g. `\"ab {<# comment #>} cd\"`).") \
70 v(2301, Warning, WarnParser_SpaceBetweenEqualsAndUnary, "") \
71 v(2302, Warning, WarnSemantic_UnreachableCases, "") \
72 v(2303, Warning, WarnSemantic_RedundantAttribute, "") \
73 v(2304, Warning, WarnSemantic_UseOfExperimentalDefinition, "Please note using experimental features in your project will prevent you from publishing that project.") \
74 v(2306, Warning, WarnSemantic_CaseInsensitiveNames, "") \
76 v(3000, Error, ErrSystem_CannotReadText, "Error reading text file") \
77 v(3001, Error, ErrSystem_CannotReadVst, "Error reading text file") \
78 v(3002, Error, ErrSystem_BadPackageFileName, "") \
79 v(3003, Error, ErrSystem_IllegalSubPackage, "") \
80 v(3004, Error, ErrSystem_DuplicateDigestFile, "") \
81 v(3005, Error, ErrSystem_InvalidModuleName, "") \
82 v(3006, Error, ErrSystem_CannotWriteText, "") \
83 v(3007, Error, ErrSystem_CannotCreateDirectory, "") \
84 v(3008, Error, ErrSystem_CannotDeleteDirectory, "") \
85 v(3009, Error, ErrSystem_BadModuleFileName, "") \
86 v(3010, Error, ErrSystem_InvalidModuleFile, "") \
87 v(3011, Error, ErrSystem_UnexpectedDigestFile, "") \
88 v(3012, Error, ErrSystem_InconsistentNativeFileExtension, "") \
89 v(3013, Error, ErrSystem_InvalidVerseVersion, "") \
90 v(3014, Error, ErrSystem_BadSnippetFileName, "") \
92 v(3100, Error, ErrSyntax_InternalError, "Internal parser error") \
93 v(3101, Error, ErrSyntax_Unimplemented, "Feature is not yet implemented.") \
94 v(3102, Error, ErrSyntax_UnexpectedClauseTag, "Clause tag `[X]` is unexpected in this context.") \
95 v(3103, Error, ErrSyntax_ExpectedIfCondition, "Expected a condition block before `then` block while parsing `if`.") \
96 v(3104, Error, ErrSyntax_DanglingEquals, "Dangling '=' or missing ':type' for function definition! Hint: a function definition needs a type like 'f():int' or a definition 'f():int=2*2'.") \
97 v(3105, Error, ErrSyntax_ExpectedExpression, "Expected an expression and found an invalid character.") \
98 v(3106, Error, ErrSyntax_MalformedPackageFile, "") \
99 v(3107, Error, ErrSyntax_MalformedProjectFile, "") \
100 v(3108, Error, ErrSyntax_MalformedModuleFile, "") \
101 v(3109, Error, ErrSyntax_UnrecognizedFloatBitWidth, "When using a float `f` suffix, the bit width must be specified explicitly. Use `f64` (the only currently acceptable usage) or omit a float suffix if a decimal part is present - i.e. `42f64` or `42.0`") \
103 v(3500, Error, ErrSemantic_Internal, "Encountered an internal error (e.g. a malformed syntax node).") \
104 v(3501, Error, ErrSemantic_Placeholder, "A placeholder is present. Code cannot be executed.") \
105 v(3502, Error, ErrSemantic_Unimplemented, "Language feature is not yet implemented.") \
106 v(3503, Error, ErrSemantic_AmbiguousTypeVariable, "") \
107 v(3504, Error, ErrSemantic_UnknownPackageDependency, "") \
108 v(3505, Error, ErrSemantic_CircularPackageDependency, "") \
109 v(3506, Error, ErrSemantic_UnknownIdentifier, "Unknown identifier %s.") \
110 v(3507, Error, ErrSemantic_DefinitionNotFromDependentPackage, "") \
111 v(3508, Error, ErrSemantic_UnexpectedNumberOfArguments, "%s.%s expects %d arguments, but %d given.") \
112 v(3509, Error, ErrSemantic_IncompatibleArgument, "The argument for parameter %s of %s.%s is of type %s which is incompatible with the expected type %s.") \
113 v(3510, Error, ErrSemantic_IncompatibleReturnValue, "The return value of %s.%s is of type %s which is incompatible with the expected type %s.") \
114 v(3511, Error, ErrSemantic_IncompatibleFailure, "`%s.%s` is invoked with incorrect failure bracketing style.") \
115 v(3512, Error, ErrSemantic_EffectNotAllowed, "This effect is not allowed in this context.") \
116 v(3513, Error, ErrSemantic_ExpectedFallibleExpression, "Expected an expression that can fail.") \
117 v(3514, Error, ErrSemantic_RedefinitionOfReservedIdentifier, "Cannot use reserved identifier `%s` as definition name.") \
118 v(3515, Error, ErrSemantic_MutableMissingType, "Missing type for `^` or `var` definition.") \
119 v(3516, Error, ErrSemantic_ExpectedPointerType, "Expected pointer type.") \
120 v(3517, Error, ErrSemantic_ExpectedDereferencedPointer, "Expected a dereferenced pointer (e.g. Pointer^)") \
121 v(3518, Error, ErrSemantic_AmbiguousOverload, "Ambiguous function overload") \
122 v(3519, Error, ErrSemantic_ConcreteClassDataMemberLacksValue, "") \
123 v(3520, Error, ErrSemantic_ExpectedIterationIterable, "The right hand side of an iteration mapping (lhs:rhs) must be something such as an array that can be iterated.") \
124 v(3521, Error, ErrSemantic_AsyncRequiresTaskClass, "Definition of an async function found, but no task class exists.") \
125 v(3522, Error, ErrSemantic_ExpectedImmediateExpr, "Found async expression (such as a coroutine call or concurrency primitive) when an immediate expression (such as a function call) was desired.\nMaybe put this code in a coroutine or wrap it in a `branch` or `spawn` to make it immediate?") \
126 v(3523, Error, ErrSemantic_IncorrectOverride, "Either override without override attribute, or override attribute without override.") \
127 v(3524, Error, ErrSemantic_ExpectIterable, "Needs something to iterate over") \
128 v(3525, Error, ErrSemantic_ExpectedSingleExpression, "Expected a single expression, but found more than one.") \
129 v(3526, Error, ErrSemantic_MalformedConditional, "Malformed conditional expression.") \
130 v(3527, Error, ErrSemantic_PrefixOpNoOperand, "Prefix operation without operand.") \
131 v(3528, Error, ErrSemantic_BinaryOpNoOperands, "Binary operation without operands.") \
132 v(3529, Error, ErrSemantic_BinaryOpExpectedTwoOperands, "Binary operation requires two operands.") \
133 v(3530, Error, ErrSemantic_ExpectedCoroutine, "A `branch` may only be used within the body of a coroutine.") \
134 v(3531, Error, ErrSemantic_UnicodeOutOfRange, "Unicode character is out of supported range.") \
135 v(3532, Error, ErrSemantic_AmbiguousDefinition, "This symbol conflicts with another definition in scope.") \
136 v(3534, Error, ErrSemantic_InvalidPositionForReturn, "Invalid position for return; return must not occur as a subexpression of another return") \
137 v(3535, Error, ErrSemantic_ReturnInFailureContext, "Explicit return out of a failure context is not allowed") \
138 v(3536, Error, ErrSemantic_TupleElementIdxRange, "Tuple element access expected an integer literal within the range 0-%i and got %s.") \
139 v(3537, Error, ErrSemantic_InvalidContextForUsing, "'using' macro may only specify modules at module scope and local variables at local scope.") \
140 v(3538, Error, ErrSemantic_ExpectedAsyncExprs, "Expected async expression") \
141 v(3539, Error, ErrSemantic_ExpectedAsyncExprNumber, "Expected correct number of async expressions") \
142 v(3540, Error, ErrSemantic_MalformedParameter, "Parameter must be a type spec.") \
143 v(3541, Error, ErrSemantic_MultipleReturnValuesUnsupported, "Multiple return values are not supported") \
144 v(3542, Error, ErrSemantic_InvalidReturnType, "Return type is not valid") \
145 v(3543, Error, ErrSemantic_AccessLevelConflict, "Conflicting access levels: [access levels]. Only one access level may be used or omit for default access.") \
146 v(3544, Error, ErrSemantic_MalformedMacro, "") \
147 v(3545, Error, ErrSemantic_UnrecognizedMacro, "") \
148 v(3546, Error, ErrSemantic_ExpectedIdentifier, "Expected identifier") \
149 v(3547, Error, ErrSemantic_ExpectedType, "Expected type") \
150 v(3548, Error, ErrSemantic_UnexpectedIdentifier, "Unexpected identifier") \
151 v(3549, Error, ErrSemantic_LhsNotDefineable, "The left hand side of this definition is an expression that cannot be defined.") \
152 v(3550, Error, ErrSemantic_CannotAccessInstanceMember, "Can't access instance member `%s.%s` while in `%s` class scope.") \
153 v(3551, Error, ErrSemantic_MayNotSkipOutOfSpawn, "May not skip out of `spawn`.") \
154 v(3552, Error, ErrSemantic_Unsupported, "Features that are not implemented yet") \
155 v(3553, Error, ErrSemantic_InvalidAttribute, "Unable to create attribute expression") \
156 v(3554, Error, ErrSemantic_FloatLiteralOutOfRange, "") \
157 v(3555, Error, ErrSemantic_IntegerLiteralOutOfRange, "") \
158 v(3556, Error, ErrSemantic_MayNotSkipOutOfBranch, "May not skip out of `branch`.") \
159 v(3557, Error, ErrSemantic_InterfaceOrClassInheritsFromItself,"Interface or class inherits from itself.") \
160 v(3558, Error, ErrSemantic_ExternalNotAllowed, "external{} macro must not be used in regular Verse code. It is a placeholder allowed only in digests.") \
161 v(3559, Error, ErrSemantic_TooManyMacroClauses, "Too many clauses following macro identifier.") \
162 v(3560, Error, ErrSemantic_ExpectedDefinition, "Expected definition.") \
163 v(3561, Error, ErrSemantic_NativeMemberOfNonNativeClass, "Native definitions may not be members of a non-native class") \
164 v(3562, Error, ErrSemantic_NonNativeSuperClass, "Native classes must have a native super-class") \
165 v(3563, Error, ErrSemantic_NonNativeStructInNativeClass, "Member `struct` contained in a native type must also be native") \
166 v(3564, Error, ErrSemantic_NonNativeStructInNativeFunction, "`struct` parameters or results used in native functions must also be native") \
167 v(3565, Error, ErrSemantic_InvalidEffectDeclaration, "") \
168 v(3566, Error, ErrSemantic_MayNotSkipOutOfDefer, "May not skip out of defer.") \
169 v(3567, Error, ErrSemantic_DeferLocation, "A `defer` may not be used here - it must be used within a code block such as a routine, `do`, `if` then/else, `for`, `loop`, `branch` or `spawn` and it must be followed by one or more expressions that it executes after.") \
170 v(3568, Error, ErrSemantic_CannotOverrideFinalMember, "Cannot declare instance data-member `CurrentClass.dataMember` because its `[SuperClass]` already has [an instance/a class] member with the same `final` attribute.") \
171 v(3569, Error, ErrSemantic_FinalSuperclass, "Class `[CurrentClass]` cannot be a subclass of the class `[SuperClass]` which has the `final` attribute.") \
172 v(3570, Error, ErrSemantic_UseOfExperimentalDefinition, "") \
173 v(3571, Error, ErrSemantic_UnexpectedAbstractClass, "Cannot instantiate class `[CurrentClass]` because it has the `abstract` attribute. Use a subclass of it.") \
174 v(3572, Error, ErrSemantic_ConstructorFunctionBody, "Constructor function body must be an archetype instantiation.") \
175 v(3573, Error, ErrSemantic_ConstructorFunctionBodyResultType, "Constructor function result type must exactly match contained archetype instantiation.") \
176 v(3574, Error, ErrSemantic_NoSuperclass, "Class `[CurrentClass]` does not have a superclass.") \
177 v(3575, Error, ErrSemantic_CharLiteralDoesNotContainOneChar, "Character literal doesn't contain exactly one character.") \
178 v(3576, Error, ErrSemantic_FailedResolveOfGenericsSignature, "Failed to resolve the generic call signature from the call site context.") \
179 v(3577, Error, ErrSemantic_UnexpectedExpression, "Unexpected expression") \
180 v(3578, Error, ErrSemantic_ExpectedExprs, "Expected one or more expressions in the code block body and found none.") \
181 v(3579, Error, ErrSemantic_InfiniteIteration, "To prevent infinite immediate iteration, `loop` must have one or more subexpressions that are either async (such as a coroutine) or a jump out (such as `break` or `return`).") \
182 v(3580, Error, ErrSemantic_ExpectedExternal, "external{} macro expected here since the code is a digest.") \
183 v(3581, Error, ErrSemantic_BreakNotInBreakableContext, "This `break` is not in a breakable context. `break` may currently only be used inside a `loop`.") \
184 v(3582, Error, ErrSemantic_CannotInitDataMemberWithSideEffect,"Expressions with potential side effects cannot be used when defining data-members.") \
185 v(3583, Error, ErrSemantic_StructContainsItself, "Structs may not contain themselves.") \
186 v(3584, Error, ErrSemantic_OnlyFunctionsInInterfaceBody, "Expected function signature in interface definition body.") \
187 v(3585, Error, ErrSemantic_FunctionSignatureMustDeclareReturn,"Function declaration must declare return type or body.") \
188 v(3586, Error, ErrSemantic_ExpectedTypeDefinition, "Expected type definition macro (e.g. `class`, `enum`, or `interface`).") \
189 v(3587, Error, ErrSemantic_InvalidScopePath, "Invalid scope path") \
190 v(3588, Error, ErrSemantic_AmbiguousIdentifier, "") \
191 v(3589, Error, ErrSemantic_MultipleSuperClasses, "Classes may only inherit from a single class") \
192 v(3590, Error, ErrSemantic_ExpectedInterfaceOrClass, "Expected interface or class") \
193 v(3591, Error, ErrSemantic_AbstractFunctionInNonAbstractClass,"Non-abstract class inherits abstract function `%s` from `%s` but does not provide an implementation.") \
194 v(3592, Error, ErrSemantic_RedundantInterfaceInheritance, "Redundant interface inheritance") \
195 v(3593, Error, ErrSemantic_Inaccessible, "") \
196 v(3594, Error, ErrSemantic_InvalidAccessLevel, "Access levels protected and private are only allowed inside classes.") \
197 v(3595, Error, ErrSemantic_StructSuperType, "Structs may not inherit from any other types.") \
198 v(3596, Error, ErrSemantic_InvalidAttributeScope, "Attribute does not have the right attribute scope.") \
199 v(3597, Error, ErrSemantic_NativeWithBody, "Functions declared native must not have a body or empty assignment.") \
200 v(3598, Error, ErrSemantic_UnexpectedAbstractFunction, "Unexpected abstract function outside class or interface.") \
201 v(3599, Error, ErrSemantic_ExpectedInterface, "Expected interface.") \
202 v(3600, Error, ErrSemantic_MissingDataMemberInitializer, "Archetype must initialize data member `%s`.") \
203 v(3601, Error, ErrSemantic_MissingValueInitializer, "`%s` must be initialized with a default value.") \
204 v(3602, Error, ErrSemantic_OverrideSignatureMismatch, "Signature of overriding function must match the signature of the overridden function.") \
205 v(3603, Error, ErrSemantic_StructFunction, "Structs may not contain functions.") \
206 v(3604, Error, ErrSemantic_AttributeNotAllowed, "Valid attribute, but not allowed here.") \
207 v(3605, Error, ErrSemantic_NotEnoughMacroClauses, "Not enough macro clauses") \
208 v(3606, Error, ErrSemantic_NominalTypeInAnonymousContext, "Nominal type in anonymous context") \
209 v(3607, Error, ErrSemantic_StructMutable, "Structs may not contain mutable members.") \
210 v(3608, Error, ErrSemantic_ExpectedFunction, "Expected function") \
211 v(3609, Error, ErrSemantic_AmbiguousOverride, "Ambiguous function or data member override") \
212 v(3610, Error, ErrSemantic_InvalidContextForBlock, "'block' macro may only be used at class or function scope.") \
213 v(3611, Error, ErrSemantic_UnexpectedQualifier, "Qualifier is unexpected in this context") \
214 v(3612, Error, ErrSemantic_InvalidQualifier, "Invalid qualifier") \
215 v(3613, Error, ErrSemantic_ConflictingAttributeScope, "Conflicting attribute scopes") \
216 v(3614, Error, ErrSemantic_ExpectedModule, "Expected module.") \
217 v(3615, Error, ErrSemantic_NoCasePatterns, "Case statement should have at least one pattern.") \
218 v(3616, Error, ErrSemantic_UnreachableCases, "Case statement has unreachable cases.") \
219 v(3617, Error, ErrSemantic_InvalidCasePattern, "Case pattern must be a literal or `_`.") \
220 v(3618, Error, ErrSemantic_CaseTypeMismatch, "Case pattern has a different type than the case value.") \
221 v(3619, Error, ErrSemantic_EmptyValueClause, "Case expression must have a value.") \
222 v(3620, Error, ErrSemantic_BadCasePattern, "Case patterns must be of the form `a => b`.") \
223 v(3621, Error, ErrSemantic_SquareBracketFuncDefsDisallowed, "Function definitions with `[` and `]` are disallowed; did you mean `(...)<decides>`?") \
224 v(3622, Error, ErrSemantic_EmptyOption, "option{} requires an argument; did you mean `false`?") \
225 v(3623, Error, ErrSemantic_MismatchedPartialAttributes, "Attributes of partial module definition differ from attributes of related other partial definition.") \
226 v(3624, Error, ErrSemantic_MalformedImplicitParameter, "Implicit parameter #%d is malformed.") \
227 v(3625, Error, ErrSemantic_DefaultMustBeNamed, "Parameter #%d should be `?%s`. Default parameters must be prefixed with a question mark `?` to indicate that their name is required.") \
228 v(3626, Error, ErrSemantic_MayNotSkipOutOfArchetype, "May not skip out of archetype instantiation.") \
229 v(3627, Error, ErrSemantic_IdentifierConstructorAttribute, "<constructor> is only supported on constructor function invocations contained directly in archetype instantiations.") \
230 v(3628, Error, ErrSemantic_DuplicateNamedValueName, "Duplicate named value name.") \
231 v(3629, Error, ErrSemantic_NamedMustFollowNamed, "Parameter #%d must be named `?%s`. Once an earlier parameter is named (indicated with `?`) any parameters that follow must also be named.") \
232 v(3630, Error, ErrSemantic_NamedOrOptNonType, "Either `%s` should be a type or it is mistakenly being used as a `?named` argument. Also note that parameters do not need to be named with a `?` in the body of their function.") \
233 v(3631, Error, ErrSemantic_MultipleConstructorInvocations, "Archetype instantiation may have no more than one constructor invocation.") \
234 v(3632, Error, ErrSemantic_AbstractConcreteClass, "") \
235 v(3633, Error, ErrSemantic_ConcreteSuperclass, "") \
236 v(3634, Error, ErrSemantic_UserPackageNotAllowedWithEpicPath, "") \
237 v(3635, Error, ErrSemantic_ConstructorInvocationResultType, "") \
238 v(3636, Error, ErrSemantic_ExtensionMethodWithoutContext, "Calling extension method without context.") \
239 v(3637, Error, ErrSemantic_ReservedOperatorName, "") \
240 v(3638, Error, ErrSemantic_LocalizesRhsMustBeString, "Localized messages may only be initialized with a string literal.") \
241 v(3639, Error, ErrSemantic_LocalizesMustSpecifyType, "Localized messages must specify the 'message' type.") \
242 v(3640, Error, ErrSemantic_NamedMustBeInApplicationContext, "Named parameters only supported in a function application context") \
243 v(3641, Error, ErrSemantic_VarAttributeMustBeInClassOrModule, "Attributes on var only allowed inside a module or a class") \
244 v(3642, Error, ErrSemantic_DuplicateAccessLevel, "Duplicate access levels: [access levels]. Only one access level may be used or omit for default access.") \
245 v(3643, Error, ErrSemantic_CompatibilityRequirementMissing, "") \
246 v(3644, Error, ErrSemantic_CompatibilityRequirementAmbiguous, "") \
247 v(3645, Error, ErrSemantic_CompatibilityRequirementType, "") \
248 v(3646, Error, ErrSemantic_CompatibilityRequirementAccess, "") \
249 v(3647, Error, ErrSemantic_CompatibilityRequirementNewFieldInStruct,"") \
250 v(3648, Error, ErrSemantic_CompatibilityRequirementValue, "") \
251 v(3649, Error, ErrSemantic_CompatibilityRequirementFinal, "") \
252 v(3650, Error, ErrSemantic_OverrideCantChangeAccessLevel, "An overridden field cannot change the inherited access level") \
253 v(3651, Error, ErrSemantic_AttributeNotAllowedOnLocalVars, "Attribute %s is not allowed on local variables.") \
254 v(3652, Error, ErrSemantic_LocalizesEscape, "Unrecognized escape character in localized message.") \
255 v(3653, Error, ErrSemantic_AmbiguousDefinitionDidYouMeanToSet,"") \
256 v(3654, Error, ErrSemantic_InvalidQualifierCombination, "") \
257 v(3655, Error, ErrSemantic_TooLongIdentifier, "Identifier is too long") \
258 v(3656, Error, ErrSemantic_MutuallyExclusiveEffects, "") \
259 v(3657, Error, ErrSemantic_NonNativeTypeInNativeMember, "") \
260 v(3658, Error, ErrSemantic_BreakInFailureContext, "`break` may not be used in a failure context.") \
261 v(3659, Error, ErrSemantic_UnknownIdentifier_WithUsing, "Unknown identifier %s in '%s'. Did you forget to specify using { %s }?") \
262 v(3660, Error, ErrSemantic_LogicWithoutExpression, "Empty logic{} is not allowed, need at least one expression.") \
263 v(3661, Error, ErrSemantic_AccessSpecifierNotAllowedOnLocal, "Function local data definition '%s' is not allowed to use access level attributes (e.g. <public>, <internal>)") \
264 v(3662, Error, ErrSemantic_PersistableClassDataMemberNotPersistable, "") \
265 v(3663, Error, ErrSemantic_PersistableClassMustBeFinal, "`persistable` class must be `final`.") \
266 v(3664, Error, ErrSemantic_PersistableClassMustNotBeUnique, "`persistable` class must not be `unique`.") \
267 v(3665, Error, ErrSemantic_PersistableClassMustNotInherit, "") \
268 v(3666, Error, ErrSemantic_ScopedUsingIdentAlreadyPresent, "") \
269 v(3667, Error, ErrSemantic_ScopedUsingSelfSubtype, "") \
270 v(3668, Error, ErrSemantic_ScopedUsingExistingSubtype, "") \
271 v(3669, Error, ErrSemantic_ScopedUsingContextUnsupported, "") \
272 v(3670, Error, ErrSemantic_IncorrectUseOfAttributeType, "") \
273 v(3671, Error, ErrSemantic_CustomClassVarAccessorTypeMismatch, "") \
274 v(3672, Error, ErrSemantic_LocalMustBeUsedAsQualifier, "Currently, `(local:)` can only be used as a qualifier.") \
275 v(3673, Error, ErrSemantic_MissingFinalFieldInitializer, "") \
276 v(3674, Error, ErrSemantic_FinalNonFieldDefinition, "") \
277 v(3675, Error, ErrSemantic_ProfileOnlyAllowedInFunctions, "") \
278 v(3676, Error, ErrSemantic_PackageRoleMismatch, "") \
279 v(3677, Error, ErrSemantic_NativePackageDependencyCycle, "") \
280 v(3678, Error, ErrSemantic_TypeNotMarkedAsCastable, "") \
281 v(3679, Error, ErrSemantic_DirectTypeLacksBaseType, "") \
282 v(3680, Error, ErrSemantic_MissingAttribute, "") \
283 v(3681, Error, ErrSemantic_DuplicateAttributeNotAllowed, "") \
284 v(3682, Error, ErrSemantic_SetExprUsedOutsideAssignment, "") \
285 v(3683, Error, ErrSemantic_MayNotSkipOutOfWhen, "May not skip out of `when`.") \
286 v(3684, Error, ErrSemantic_MayNotSkipOutOfUpon, "May not skip out of `upon`.") \
287 v(3685, Error, ErrSemantic_MayNotSkipOutOfSetLive, "May not skip out of `set live`.") \
288 v(3686, Error, ErrSemantic_MayNotSkipOutOfVarLive, "May not skip out of `var live`.") \
289 v(3687, Error, ErrSemantic_CustomClassVarAccessorNonBareIdentifier, "") \
290 v(3688, Error, ErrSemantic_CustomClassVarAccessorNonInstanceAccessor, "") \
291 v(3689, Error, ErrSemantic_NonModuleLeaderboardInstantiation,"Leaderboards can only be declared at module scope.") \
292 v(3690, Error, ErrSemantic_FieldInitializerAfterConstructorInvocation, "All field initializers must come before constructor calls in archetype instantiation.") \
294 v(9000, Error, ErrAssembler_Internal, "Assembler encountered an internal error") \
295 v(9001, Error, ErrAssembler_Unsupported, "Assembler cannot generate code because target architecture does not allow it") \
296 v(9002, Error, ErrAssembler_UnresolvedLinking, "Unable to complete runtime link task.") \
297 v(9005, Error, ErrAssembler_AttributeError, "Error applying attribute.") \
299 v(9101, Error, ErrDigest_DisallowedUsing, "") \
300 v(9102, Error, ErrDigest_Unimplemented, "") \
302 v(9200, Error, ErrToolchain_Internal, "Toolchain encountered an internal error") \
303 v(9201, Error, ErrToolchain_Injection, "") \
311#define VISIT_DIAGNOSTIC(Code, Severity, EnumName, Description) EnumName,
313#undef VISIT_DIAGNOSTIC
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define VERSE_ENUM_DIAGNOSTICS(v)
Definition Glitch.h:33
#define ULANG_FORCEINLINE
Definition Common.h:188
Definition Expression.h:297
Definition SharedPointer.h:28
ULANG_FORCEINLINE const char * AsCString() const
Definition UTF8String.h:50
Definition tLang.cpp:1785
uLang::SIndexedSourceText SIndexedSourceText
Definition VstNode.h:54
Definition VVMEngineEnvironment.h:23
const SDiagnosticInfo & GetDiagnosticInfo(EDiagnostic ResultId)
Definition Glitch.cpp:42
@ Error
Some error occurred.
EDiagnostic GetDiagnosticFromReferenceCode(uint16_t ReferenceCode)
Definition Glitch.cpp:55
EDiagnosticSeverity
Definition Glitch.h:23
TOptional< int32_t > ScanToRowCol(CUTF8StringView const &Source, const STextPosition &Position)
Definition Glitch.cpp:145
CUTF8StringView TextRangeToStringView(CUTF8StringView const &Source, STextRange const &Range)
Definition Glitch.cpp:240
EDiagnostic
Definition Glitch.h:310
VISIT_DIAGNOSTIC(Code, Severity, EnumName, Description)
ULANG_FORCEINLINE TRemoveReference< T >::Type && Move(T &&Obj)
Definition References.h:86
Definition Optional.h:131
const char * Description
Definition Glitch.h:323
uint16_t ReferenceCode
Definition Glitch.h:321
EDiagnosticSeverity Severity
Definition Glitch.h:322
CUTF8String _SnippetPath
Definition Glitch.h:356
SGlitchLocus(const CUTF8String &SnippetPath, const STextRange &Range, uintptr_t VstIdentifier)
Definition Glitch.h:372
SGlitchLocus()
Definition Glitch.h:371
VERSECOMPILER_API CUTF8String AsFormattedString() const
Definition Glitch.cpp:104
STextRange _Range
Definition Glitch.h:362
STextPosition _ResultPos
Definition Glitch.h:365
uintptr_t _VstIdentifier
Definition Glitch.h:369
CUTF8String _Message
Definition Glitch.h:340
bool IsError() const
Definition Glitch.h:346
EDiagnostic _Id
Definition Glitch.h:335
const SDiagnosticInfo & GetInfo() const
Definition Glitch.h:345
bool IsWarning() const
Definition Glitch.h:347
SGlitchResult(EDiagnostic ResultId, CUTF8String &&Message)
Definition Glitch.h:343
SGlitchLocus _Locus
Definition Glitch.h:400
SGlitchResult _Result
Definition Glitch.h:397
ULANG_FORCEINLINE SGlitch(SGlitchResult &&Result, SGlitchLocus &&Locus)
Definition Glitch.h:404
static VERSECOMPILER_API CUTF8String FormattedString(const char *Message, const char *Path, const STextRange &Range, EDiagnosticSeverity Severity=EDiagnosticSeverity::Error, EDiagnostic Diagnostic=EDiagnostic::Ok)
Definition Glitch.cpp:113
ULANG_FORCEINLINE CUTF8String AsFormattedString() const
Definition Glitch.h:417
Definition TextRange.h:20