Misc refactoring, imports, directive "requires", and validation
Add a few language features:
- Imports - includes types and directives from a
resolver
function. In practice, this will load from~/.wapc/definitions
which is installed towapc install
(upcoming PR in the CLI) - Directive
requires @other on TYPE | etc.
syntax to target what other directives must exist in relation to it (validation forthcoming)
Refactored:
- Added
validate
function that takes in configuration rules (which as visitors inrules
) - Kinds are now an enum - no more
instanceof
- Organization of classes into definitions, nodes, types & values
- More visitor hooks