-
Notifications
You must be signed in to change notification settings - Fork 4
Building a compiler
An ActionScript compiler does more than just parsing, including verification, and SWF and SWC processing.
An ActionScript compiler handles three source file formats: ActionScript 3, MXML, and CSS.
An ActionScript compiler outputs several problems, constructs a flow graph for every activation, and attaches meaning to tree nodes.
This project itself is not a compiler, but it's designated to facilitate writing one, parsing the three file formats mentioned.
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
).
Here is the Special Cases document.
Here is the IDE document.
If the last verification fails due to any syntax errors, keep the semantic database and node tree from the last verification.