Annotations support #91

Closed
opened 2023-01-20 20:12:37 +00:00 by deavmi · 2 comments
Owner

What is this?

TODO: The following:

  1. Add a specification for what annotations should look like,
  2. What they should be able to control - can probably be extended
  3. Add some basic built-in ones
  4. Add support for them to the parser
    • We will want something like an annotation forward check - for existence, if non existent, then prevTOken back and return null, else return the instance of the annotation
    • We will want to attach annotations to Statement objects
### What is this? TODO: The following: 1. Add a specification for what annotations should look like, 2. What they should be able to control - can probably be extended 3. Add some basic built-in ones 4. Add support for them to the parser * We will want something like an annotation forward check - for existence, if non existent, then prevTOken back and return `null`, else return the instance of the annotation * We will want to attach annotations to `Statement` objects
deavmi added a new dependency 2023-01-22 13:22:22 +00:00
deavmi removed a dependency 2023-01-22 13:22:25 +00:00
Author
Owner

I think we can easily implement both the declaration of user-defined annotations and the annotation decorators easily.

The latter we use a stack of string name references each time we see it. Then any entity which can accept an annotation - when being parsed - can check if the stack is empty, if not, pop off, and attach.

Then in meta-processor we process them (look them up by their name).


These are just rough ideas but I think this could work.

I think we can easily implement both the declaration of user-defined annotations and the annotation decorators easily. The latter we use a stack of string name references each time we see it. Then any entity which can accept an annotation - when being parsed - can check if the stack is empty, if not, pop off, and attach. Then in meta-processor we process them (look them up by their name). --- These are just rough ideas but I think this could work.
Author
Owner

Closing this for now due to #156 being the new issue for tracking this

Closing this for now due to #156 being the new issue for tracking this
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: tlang/tlang#91
No description provided.