Type check and coerce arguments to user functions and return values from std Rust functions (#6958)
* Shuffle around function call code Signed-off-by: Nick Cameron <nrc@ncameron.org> * Refactor function calls to share more code Signed-off-by: Nick Cameron <nrc@ncameron.org> * Hack to leave the result of revolve as a singleton rather than array Signed-off-by: Nick Cameron <nrc@ncameron.org> --------- Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
@ -3374,6 +3374,13 @@ impl DefaultParamVal {
|
||||
pub(crate) fn none() -> Self {
|
||||
Self::KclNone(KclNone::default())
|
||||
}
|
||||
|
||||
pub(crate) fn source_range(&self) -> SourceRange {
|
||||
match self {
|
||||
DefaultParamVal::Literal(l) => l.as_source_range(),
|
||||
DefaultParamVal::KclNone(_) => SourceRange::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Parameter of a KCL function.
|
||||
|
Reference in New Issue
Block a user