Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support components with fully-qualified names with
@mtkmodel
With the `@named` macro, we could use fully-qualified names for components. However, trying to do the same with `@mtkmodel`, ``` @mtkmodel Model begin @components begin resistor = ModelingToolkitStandardLibrary.Electrical.Resistor(R = 1) ... end ... end ``` throws the following error. ``` ERROR: LoadError: MethodError: Cannot `convert` an object of type Expr to an object of type Symbol Closest candidates are: convert(::Type{T}, ::T) where T @ Base Base.jl:84 Symbol(::Any...) @ Base strings/basic.jl:229 ``` Fix this and support fully qualified names by considering the fully-qualifed name's Expr while parsing components.
- Loading branch information