Max Graey

Results 346 comments of Max Graey

Also it will be ideal if you organize the code in such a way that it could be reused for Temporal proposal (https://github.com/tc39/proposal-temporal/tree/main/polyfill/lib) in future

assert failed here btw: https://github.com/AssemblyScript/assemblyscript/blob/8047b024488b74deeea5dded7efdf4b24108474d/src/program.ts#L1162

I guess when you're adding new import `filesByName` doesn't update. Btw `filesByName` updates only once during initialize program

union string literals doesn't support yet

The implementation of only union string literals (without mixed types like `"str" | 123 | true`) should not be too difficult. The only place where there may be difficulties is...

I guess this PR may help with this: https://github.com/AssemblyScript/assemblyscript/pull/2150

There are some helper lib (however a little bit outdated) with useful examples: https://github.com/willemneal/visitor-as I hope this helps

For your case you should use `afterParse(parser) {...}` and manipulate with AST

Github has a lot of examples. Ask project for example: https://github.com/ask-lang/ask/blob/main/ts-packages/transform/src/visitors/transform.ts#L207