Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntactic decorators #22

Open
justinmchase opened this issue Nov 12, 2022 · 0 comments
Open

Syntactic decorators #22

justinmchase opened this issue Nov 12, 2022 · 0 comments
Milestone

Comments

@justinmchase
Copy link
Owner

justinmchase commented Nov 12, 2022

  • The pattern language needs to support decorators, (e.g. @keyword, `@desription "A pattern that matches entitites")
  • The decorator is appended to the metadata of objects returned by the rule its attached to using the javascript Reflect api
  • Object metadata needs to be retained any time a return value is cloned for any reason

example

@description "Defines an entity type"
EntityKeyword = "entity";

@description "Defines an entity field"
FieldKeyword = "field";

@keyword
Keywords = EntityKeyword | FieldKeyword;
---
input: "entity"
metadata:
- name: description
  value: Defines an entity type
- name: keyword
@justinmchase justinmchase added this to the MVP milestone Nov 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant