public final class Es6ToEs3ClassSideInheritance extends NodeTraversal.AbstractPostOrderCallback implements CompilerPass
Es6ToEs3Converter will convert
class Foo { static f() {} }
class Bar extends Foo {}
to
function Foo() {}
Foo.f = function() {};
function Bar() {}
$jscomp$copy$properties(Foo, Bar);
and then this class will convert that to
function Foo() {}
Foo.f = function() {};
function Bar() {}
Bar.f = Foo.f;
| Constructor and Description |
|---|
Es6ToEs3ClassSideInheritance(AbstractCompiler compiler) |
| Modifier and Type | Method and Description |
|---|---|
void |
process(Node externs,
Node root)
Process the JS with root node root.
|
void |
visit(NodeTraversal t,
Node n,
Node parent)
Visits a node in postorder (after its children have been visited).
|
shouldTraversepublic Es6ToEs3ClassSideInheritance(AbstractCompiler compiler)
public void process(Node externs, Node root)
CompilerPassprocess in interface CompilerPassexterns - Top of external JS treeroot - Top of JS treepublic void visit(NodeTraversal t, Node n, Node parent)
NodeTraversal.CallbackVisits a node in postorder (after its children have been visited).
A node is visited only if all its parents should be traversed
(NodeTraversal.Callback.shouldTraverse(NodeTraversal, Node, Node)).
Implementations can have side effects (e.g. modifying the parse tree).
visit in interface NodeTraversal.CallbackCopyright © 2009-2015 Google. All Rights Reserved.