-
Notifications
You must be signed in to change notification settings - Fork 0
Building a compiler
An ActionScript compiler does more than just parsing:
- Verification, and SWF and SWC processing
- Handling of three source file formats: ActionScript 3, MXML, and CSS
- Output of several problems
- Building of control flow graphs for each activation
- Attachment of data to tree nodes.
Attach compiler options to a compilation unit by defining your own options data type and storing a reference of it by calling compilation_unit.set_compiler_options(Some(options)) where options: Rc<dyn Any>.
The parser project leaves the compiler options to be defined as part of the compiler.
The Ruffle player contains a swf package that reads and writes SWF from or into structures.
Detect domain memory operations to generate optimized AVM2 instructions.
It is interesting to consider allowing project configurations in a dependency managed manner. Something similiar to asconfig.json from the Visual Studio AS&MXML extension, but in a different way to allow dependencies that include their own ActionScript 3 configuration (including options such as strict, and inferTypes).
If the last verification fails due to any syntax errors, keep the semantic database and node tree from the last verification.