pub enum ASTBuildingError<'input> {
ConditionDoestNotResolveToBoolean {
predicate: &'input str,
},
VariableNotInScope {
variable_name: &'input str,
},
OperatorNotFound {
operator: &'input str,
},
FunctionNotFound {
function_name: &'input str,
associated_to_type: Option<String>,
module: Option<&'input str>,
},
PropertyFunctionNotFound {
preferred_property_to_find: String,
original_property: &'input str,
typename: Option<String>,
},
CouldntInlineFunction {
function_name: &'input str,
runtime_error: RuntimeError,
},
CouldntInlineGetter {
execution_error_message: String,
property: &'input str,
},
CouldntInlineUnaryOperator {
operator: &'input str,
runtime_error: RuntimeError,
},
CouldntInlineBinaryOperator {
operator: &'input str,
runtime_error: RuntimeError,
},
CouldntInlineVariableOfUnknownType {
variable_name: &'input str,
},
CannotParseInteger {
value: &'input str,
lower_bound: i128,
upper_bound: i128,
},
CannotParseDecimal {
value: &'input str,
lower_bound: f64,
upper_bound: f64,
},
}
Expand description
Specifies why an AST could not be parsed, the ’input lifetime points references the input of your script’s String value
Variants§
ConditionDoestNotResolveToBoolean
A constant predicate cannot be resolved, likely because of wrong constant function
Fields
VariableNotInScope
An ident of a variable was found, but the name doesn’t match to a variable that was created inside the script, nor an Engine’s constants or the ContextBuilder input variables
OperatorNotFound
Used an operator that doesn’t exist, this will likely never happen
FunctionNotFound
A function name was specified, but said function doesn’t exist on the Engine
Fields
PropertyFunctionNotFound
A property was specified, but it doesn’t exist on the Engine (See the Properties section of the book for more information)
Fields
CouldntInlineFunction
An error was triggered while inlining a constant function
Fields
runtime_error: RuntimeError
Specified the error that happened
CouldntInlineGetter
An error was triggered while inlining a constant getter (See getters in the Properties section of the book for more information about properties)
Fields
CouldntInlineUnaryOperator
An unary operator was tried to be inlined with a constant value, but said function failed
Fields
runtime_error: RuntimeError
Specified the error that happened
CouldntInlineBinaryOperator
A binary operator was tried to be inlined with a constant value, but said function failed
Fields
runtime_error: RuntimeError
Specified the error that happened
CouldntInlineVariableOfUnknownType
Tried to inline a constant variable whose type wasn’t specified in the ContextBuilder (nor the Engine if it is a constant).
CannotParseInteger
An integer value could not be parsed in range
Fields
CannotParseDecimal
A decimal value could not be parsed in range