Looking for transform examples, would appreciate some :-)
There are no specific transform examples yet, but this is how it works: The afterParse hook of the transform specified with --transform is called with the Parser instance when parsing has finished, containing the (yet uninitialized) Program instance that has an array of the parsed Sources, with each source node containing its respective AST. At this stage, the AST can be traversed and possibly modified, for example by looking for custom decorators that trigger injection of additional code.
@dcodeIO I think that is already helpful - thank you!
@DanielMazurkiewicz This is also a good example: https://github.com/nearprotocol/assemblyscript/tree/master/bindings/src
It's used to add JSON serialization to objects and exported functions.