royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [royale-compiler.wiki] branch master updated: Updated Developer Guide (markdown)
Date Fri, 01 Jun 2018 00:29:14 GMT
This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/royale-compiler.wiki.git


The following commit(s) were added to refs/heads/master by this push:
     new aa47c93  Updated Developer Guide (markdown)
aa47c93 is described below

commit aa47c938f6dd6d097ab45a482ff366d812338638
Author: aharui <aharui@apache.org>
AuthorDate: Thu May 31 17:29:10 2018 -0700

    Updated Developer Guide (markdown)
---
 Developer-Guide.md | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Developer-Guide.md b/Developer-Guide.md
index 72c715a..3fdbb4d 100644
--- a/Developer-Guide.md
+++ b/Developer-Guide.md
@@ -44,3 +44,10 @@ This section gives a brief overview of the classes involved in an Emitter.
 
 * **MXMLJSC.java** This is the main entry point for the Transpiler.  In the method `_mainNoExit`
you will see a switch statement for each target.  The target case statement in turn calls
a client such as MXMLJSCRoyale.
 * **MXMLJSCRoyale.java** This client then instantiates a "backend".  In this case, MXMLRoyaleBackend,
checks the configuration options, then calls the `compile` method which then calls `buildArtifact`
which runs the reducer, looking for semantic errors.  And if there are no errors, it then
calls the publisher to get an output folder, then starts going through all of the files (the
`reachableCompilationUnits`).  For each file that had ActionScript or MXML source (as opposed
to having been [...]
+* **MXMLRoyaleBackend.java** This backend will create a JSWriter for ActionScript files and
an MXMLWriter for MXML files.  When asked by a JSWriter, it will tell the JSWriter to use
as ASBlockWalker to walk the AST for an ActionScript file and use JSRoyaleEmitter as the emitter.
 For MXML files, this backend will tell the MXMLWriter to use MXMLRoyaleBlockWalker to walk
the AST for an MXML file and use MXMLRoyaleEmitter as the emitter.
+* **JSWriter.java**  In its `writeTo` method, this writer tells the walker to 'visit' the
compilation unit.  This starts the walking of the AST.  Each node will be 'visited' in a standard
top-down tree walk.
+* **MXMLWriter.java**  In its writeTo method, this writer will set up a JSFilterWriter for
any Script block in the MXML and tell it to use ASBlockWalker and JSRoyaleEmitter as the emitter.
 Then it will tell MXMLRoyaleBlockWalker to 'visit' the compilation unit.
+* **ASBlockWalker.java**  This should look like a standard tree walking algorithm with 'visit'
methods for each of the nodes.  The 'visit' methods generally call an emitter method.
+* **MXMLRoyaleBlockWalker.java** This should also look like a standard tree walking algorithm
with 'visit' methods for each of the nodes.
+* **JSRoyaleEmitter.java**  This emitter has methods to emit JavaScript for every node. 
Much of the actual output code has been encapsulated in support classes like IdentifierEmitter
and LiteralEmitter to make it easier to re-use these emitters when customizing output.
+* **MXMLRoyaleEmitter.java** This emitter has methods for each MXML AST node.  However, MXML
is output mostly as a data structure, and not as much JavaScript.  So the methods build up
that data structure.

-- 
To stop receiving notification emails like this one, please contact
aharui@apache.org.

Mime
View raw message