Skip to content

Commit 056ef1f

Browse files
Transformer hook notes in TODO.md
1 parent 4afd421 commit 056ef1f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

TODO.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ Working document of notes/tasks for trying to figure out how to correctly add de
66

77

88
NOTES:
9+
- AST can be extended without breaking changes, this is perfectly fine and anything that is added will just be ignored by the compiler but at least transformer plugins can then make use of it. No need to validate and throw errors unless it is an AST parse error.
10+
- Need to add a transformer hook so transformers can add their own validation. This way AssemblyScript can delegate validation to transformers instead of having to handle it internally, which doesn't make sense because AS shouldn't be in charge of worring about that in the first place.
11+
912
- "Transformer" refers the to transformers in /tests/transform
1013

1114
- Rather than have a method validate the decorators, they should just be part of the AST. Once the AST can directly handle the decorators then validating decorators syntax will happen automatically. This also means we need actual AST nodes in ast.ts for the different parts of decorators rather than just inlining the decorators.

0 commit comments

Comments
 (0)