Skip to content

Commit 6367ed3

Browse files
docs: improve docstring for complete
1 parent ee8a461 commit 6367ed3

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/systems/abstractsystem.jl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,9 @@ the global structure of the system.
732732
733733
One property to note is that if a system is complete, the system will no longer
734734
namespace its subsystems or variables, i.e. `isequal(complete(sys).v.i, v.i)`.
735+
736+
This namespacing functionality can also be toggled independently of `complete`
737+
using [`toggle_namespacing`](@ref).
735738
"""
736739
function complete(
737740
sys::AbstractSystem; split = true, flatten = true, add_initial_parameters = true)
@@ -2495,6 +2498,22 @@ macro component(expr)
24952498
esc(component_post_processing(expr, false))
24962499
end
24972500

2501+
"""
2502+
$(TYPEDSIGNATURES)
2503+
2504+
Macro shorthand for building and compiling a system in one step.
2505+
2506+
```julia
2507+
@mtkcompile sys = Constructor(args...; kwargs....)
2508+
```
2509+
2510+
Is shorthand for
2511+
2512+
```julia
2513+
@named sys = Constructor(args...; kwargs...)
2514+
sys = mtkcompile(sys)
2515+
```
2516+
"""
24982517
macro mtkcompile(exprs...)
24992518
expr = exprs[1]
25002519
named_expr = ModelingToolkit.named_expr(expr)

0 commit comments

Comments
 (0)