- Index
- »
- hx
- »
- ProjCompanion
type
ProjCompanion
const mixin ProjCompanion
Manage Xeto specs and instances in the project companion library
Spec record AST format:
- rt: required to be "spec"
- name: unique str name in companion lib
- spec: must be @sys::Spec
- base: ref qname for base type
- slots: grid with cols: name, type ref, plus col for each meta
- any other tags are spec meta
- all type references must be a qname ref
Instance record AST format:
- rt: required to be "instance"
- name: unique str name in companion lib
- spec: must be anything other than @sys::Spec
- any other tags for instance data
methods
| add |
Add a new spec or instance to the companion lib. |
|---|---|
| func |
Create dict AST respresentation for an Axon function |
| lib |
Get the project companion lib. |
| list |
List all records for companion lib specs and instances |
| parse |
Parse the Xeto source representation into its dict AST representation. |
|
Print the Xeto source representation from its dict AST representation. |
|
| read |
Read the record for the given companion lib spec or instance |
| remove |
Remove the spec or instance definition by name from companion lib. |
| rename |
Rename an existing spec or instance in the companion lib. |
| update |
Update an existing spec or instance to the companion lib. |
Slot Details
add
func
lib
list
abstract Dict[] list()
List all records for companion lib specs and instances
parse
read
remove
rename
update
abstract Void update(Dict rec)
Update an existing spec or instance to the companion lib. The given dict must match the AST respresentation as described in class header. Raise exception if no existing definition for name. The namespace is reloaded on next access. If id/mod tags are passsed then they must match the existing record in database.