public final class Es6ToEs3ClassSideInheritance extends Object implements HotSwapCompilerPass
For example, Es6ToEs3Converter will convert
class Foo { static f() {} }
class Bar extends Foo {}
to
function Foo() {}
Foo.f = function() {};
function Bar() {}
$jscomp.inherits(Foo, Bar);
and then this class will convert that to
function Foo() {}
Foo.f = function() {};
function Bar() {}
$jscomp.inherits(Foo, Bar);
Bar.f = Foo.f;
| Constructor and Description |
|---|
Es6ToEs3ClassSideInheritance(AbstractCompiler compiler) |
| Modifier and Type | Method and Description |
|---|---|
void |
hotSwapScript(Node scriptRoot,
Node originalRoot)
Process the JS with root node root.
|
void |
process(Node externs,
Node root)
Process the JS with root node root.
|
public Es6ToEs3ClassSideInheritance(AbstractCompiler compiler)
public void process(Node externs, Node root)
CompilerPassprocess in interface CompilerPassexterns - Top of external JS treeroot - Top of JS treepublic void hotSwapScript(Node scriptRoot, Node originalRoot)
HotSwapCompilerPasshotSwapScript in interface HotSwapCompilerPassscriptRoot - Root node corresponding to the file that is modified,
should be of type Token.SCRIPT.originalRoot - Root node corresponding to the original version of the
file that is modified. Should be of type token.SCRIPT.Copyright © 2009-2015 Google. All Rights Reserved.