Clean up
This commit is contained in:
parent
5f186ade41
commit
d032334635
@ -838,8 +838,8 @@ impl Vm {
|
|||||||
return Err(RuntimeError::UndefinedField {
|
return Err(RuntimeError::UndefinedField {
|
||||||
value: container_value,
|
value: container_value,
|
||||||
value_position: container_position,
|
value_position: container_position,
|
||||||
property: field.inner,
|
field: field.inner,
|
||||||
property_position: field.position,
|
field_position: field.position,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1198,8 +1198,8 @@ pub enum RuntimeError {
|
|||||||
UndefinedField {
|
UndefinedField {
|
||||||
value: Value,
|
value: Value,
|
||||||
value_position: Span,
|
value_position: Span,
|
||||||
property: Identifier,
|
field: Identifier,
|
||||||
property_position: Span,
|
field_position: Span,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1240,11 +1240,8 @@ impl RuntimeError {
|
|||||||
end_position,
|
end_position,
|
||||||
..
|
..
|
||||||
} => (start_position.0, end_position.1),
|
} => (start_position.0, end_position.1),
|
||||||
|
|
||||||
Self::UndefinedType { position, .. } => *position,
|
Self::UndefinedType { position, .. } => *position,
|
||||||
Self::UndefinedField {
|
Self::UndefinedField { field_position, .. } => *field_position,
|
||||||
property_position, ..
|
|
||||||
} => *property_position,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1404,9 +1401,11 @@ impl Display for RuntimeError {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
Self::UndefinedField {
|
Self::UndefinedField {
|
||||||
value, property, ..
|
value,
|
||||||
|
field: property,
|
||||||
|
..
|
||||||
} => {
|
} => {
|
||||||
write!(f, "Value {} does not have the property {}", value, property)
|
write!(f, "Value {} does not have the field {}", value, property)
|
||||||
}
|
}
|
||||||
Self::UndefinedType {
|
Self::UndefinedType {
|
||||||
identifier,
|
identifier,
|
||||||
|
Loading…
Reference in New Issue
Block a user