@neo-one/smart-contract-compiler
Version:
NEO•ONE TypeScript smart contract compiler.
64 lines (62 loc) • 6.97 kB
JavaScript
export var DiagnosticMessage;
(function (DiagnosticMessage) {
DiagnosticMessage["UnsupportedSyntax"] = "Unsupported syntax.";
DiagnosticMessage["EfficiencyUnsupportedSyntax"] = "Unsupported syntax. This is not supported because it would result in inefficient smart contract code";
DiagnosticMessage["CouldNotInferType"] = "Could not infer type. Please add an explicit type annotation.";
DiagnosticMessage["CouldNotInferTypeDeopt"] = "Could not infer type. Deoptimized implementation will be used. Add an explicit type annotation ";
DiagnosticMessage["CouldNotInferSymbol"] = "Could not infer symbol.";
DiagnosticMessage["CouldNotInferSymbolDeopt"] = "Could not infer symbol. Deoptimized implementation will be used.";
DiagnosticMessage["CannotImplementBuiltin"] = "Built-ins cannot be implemented.";
DiagnosticMessage["CannotReferenceBuiltinProperty"] = "Builtin properties cannot be referenced";
DiagnosticMessage["CannotModifyBuiltin"] = "Builtins cannot be modified";
DiagnosticMessage["CannotIndexBuiltin"] = "Builtin properties cannot be referenced";
DiagnosticMessage["CannotReferenceBuiltin"] = "Builtins cannot be referenced";
DiagnosticMessage["CannotInstanceofBuiltin"] = "Builtins cannot be checked with instanceof";
DiagnosticMessage["InvalidSyscall"] = "First argument to syscall must be a string literal corresponding to a NEO syscall.";
DiagnosticMessage["DeployReserved"] = "The deploy method is reserved in SmartContract instances.";
DiagnosticMessage["InvalidContractEventNameStringLiteral"] = "Invalid SmartContract event. Event name must be a string literal.";
DiagnosticMessage["InvalidContractEventMissingType"] = "Invalid SmartContract event. Argument type must be explicitly defined.";
DiagnosticMessage["InvalidContractType"] = "Invalid SmartContract type. See https://neo-one.io/docs/methods#Parameter-and-Return-Types for valid parameter and return types.";
DiagnosticMessage["InvalidContractStorageType"] = "Invalid SmartContract storage type. See https://neo-one.io/docs/properties-and-storage#Storage-Types for valid storage types.";
DiagnosticMessage["InvalidContractEventArgStringLiteral"] = "Invalid SmartContract event. Argument must be a string literal.";
DiagnosticMessage["InvalidContractEventDeclaration"] = "Invalid SmartContract event. Event must be assigned to a variable.";
DiagnosticMessage["InvalidContractPropertiesMissing"] = "Invalid SmartContract. Properties must be defined.";
DiagnosticMessage["InvalidContractPropertiesInitializer"] = "Invalid SmartContract. Properties must be defined with an object literal of literal properties.";
DiagnosticMessage["InvalidContractMethodMultipleSignatures"] = "Invalid SmartContract method. Method must have one call signature";
DiagnosticMessage["InvalidContractConstructor"] = "Expected a single constructor declaration";
DiagnosticMessage["InvalidContractExtends"] = "Expected a single class declaration";
DiagnosticMessage["InvalidContractMultipleInFile"] = "Multiple exported SmartContracts in one file is not supported.";
DiagnosticMessage["InvalidContractPropertyReserved"] = "%s is a reserved property name in SmartContracts.";
DiagnosticMessage["InvalidContractMethodReserved"] = "%s is a reserved method name in SmartContracts.";
DiagnosticMessage["InvalidContractMethodConstantNative"] = "SmartContract methods marked with @send, @sendUnsafe, @receive or @claim cannot be @constant.";
DiagnosticMessage["InvalidContractAbstract"] = "Cannot compile abstract SmartContract.";
DiagnosticMessage["InvalidContractNew"] = "Cannot construct a SmartContract";
DiagnosticMessage["InvalidContractMethodNativeReturn"] = "SmartContract methods marked with @claim must return void.";
DiagnosticMessage["InvalidContractTypeForwardNative"] = "Cannot use ForwardValue or ForwardedValue as parameters for methods marked with @send, @sendUnsafe, @receive or @claim.";
DiagnosticMessage["SyscallReturnTypeExplicitCast"] = "Syscall return type must be explicitly casted to expected type.";
DiagnosticMessage["UnknownReference"] = "Unknown reference %s";
DiagnosticMessage["UnknownModule"] = "Unknown module %s";
DiagnosticMessage["MultipleSignatures"] = "Found multiple call signatures for property. Only one call signature is allowed.";
DiagnosticMessage["MissingParameterDeclaration"] = "Could not find param declaration for parameter %s.";
DiagnosticMessage["ResolveOneType"] = "Expected type to resolve to one known type";
DiagnosticMessage["InvalidAddress"] = "Argument to Address.from must be a string literal address.";
DiagnosticMessage["InvalidHash256"] = "Argument to Hash256.from must be a string literal hash256.";
DiagnosticMessage["InvalidPublicKey"] = "Argument to PublicKey.from must be a string literal publicKey.";
DiagnosticMessage["EventNotifierArguments"] = "The arguments to createEventNotifier must be string literals.";
DiagnosticMessage["InvalidBuiltinCall"] = "Value is not callable.";
DiagnosticMessage["InvalidBuiltinCallArgument"] = "Call parameter is ambiguous in relation to the provided argument.";
DiagnosticMessage["InvalidBuiltinAssignment"] = "Assignment (%s => %s) is ambiguous in relation to the provided expression.";
DiagnosticMessage["InvalidLinkedSmartContractDeclaration"] = "Expected a valid declaration for a linked smart contract.";
DiagnosticMessage["InvalidLinkedSmartContractMissing"] = "Missing linked smart contract dependency %s";
DiagnosticMessage["InvalidCurrentTimeOffsetNumericLiteral"] = "Deploy.currentTime must have a numeric literal for the offset.";
DiagnosticMessage["InvalidCurrentTimeParameterUsage"] = "Deploy.currentTime may only be used as the default value for a constructor parameter.";
DiagnosticMessage["InvalidSenderAddressParameterUsage"] = "Deploy.senderAddress may only be used as the default value for a constructor parameter.";
DiagnosticMessage["InvalidStructuredStorageForProperty"] = "Persistent storage classes may only be used as SmartContract private or protected readonly properties with a property initializer.";
DiagnosticMessage["InvalidStructuredStorageForLength"] = "Could not statically analyze structured storage key length.";
DiagnosticMessage["CompilationFailedPleaseReport"] = "Compilation failed for an unknown error, please report";
DiagnosticMessage["InvalidContractPropertyIdentifier"] = "SmartContracts cannot have computed methods or properties.";
DiagnosticMessage["InvalidContractPropertyOrMethodStatic"] = "SmartContracts cannot have static methods or properties.";
DiagnosticMessage["UnsupportedDecorator"] = "Custom decorators are not supported";
DiagnosticMessage["InvalidContractEventDuplicate"] = "Duplicate event. Only one event is allowed per name.";
})(DiagnosticMessage || (DiagnosticMessage = {}));
//# sourceMappingURL=DiagnosticMessage.js.map