Skip to content

Misc refactoring, imports, directive "requires", and validation

Compare
Choose a tag to compare
@pkedy pkedy released this 12 May 21:13
· 12 commits to main since this release

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 to wapc 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 in rules)
  • Kinds are now an enum - no more instanceof
  • Organization of classes into definitions, nodes, types & values
  • More visitor hooks