fix(setup): use upstream traceur with explicit patches

Also correct the transpile to ES6

Also support generics correctly

All patches are hooked in via `/tools/transpiler/index.js`
https://github.com/google/traceur-compiler/issues/1700
https://github.com/google/traceur-compiler/issues/1699
https://github.com/google/traceur-compiler/issues/1708
https://github.com/google/traceur-compiler/issues/1625
https://github.com/google/traceur-compiler/issues/1706
This commit is contained in:
Tobias Bosch
2015-02-06 13:38:52 -08:00
parent 63d8107d1c
commit f39c6dc2c7
46 changed files with 515 additions and 125 deletions

View File

@ -9,6 +9,7 @@ export class EventEmitter extends DependencyAnnotation {
eventName: string;
@CONST()
constructor(eventName) {
super();
this.eventName = eventName;
}
}

View File

@ -8,6 +8,7 @@ import {DependencyAnnotation} from 'angular2/di';
export class Parent extends DependencyAnnotation {
@CONST()
constructor() {
super();
}
}
@ -18,5 +19,6 @@ export class Parent extends DependencyAnnotation {
export class Ancestor extends DependencyAnnotation {
@CONST()
constructor() {
super();
}
}

View File

@ -15,6 +15,7 @@ import {DirectiveMetadata} from './directive_metadata';
import {Component} from '../annotations/annotations';
import {Content} from './shadow_dom_emulation/content_tag';
import {ShadowDomStrategy} from './shadow_dom_strategy';
import {CompileStep} from './pipeline/compile_step';
/**
* Cache that stores the ProtoView of the template of a component.

View File

@ -640,6 +640,7 @@ export class ElementInjector extends TreeNode {
class OutOfBoundsAccess extends Error {
message:string;
constructor(index) {
super();
this.message = `Index ${index} is out-of-bounds.`;
}

View File

@ -30,6 +30,7 @@ import {ShadowDomStrategy} from '../shadow_dom_strategy';
export class DirectiveParser extends CompileStep {
_selectorMatcher:SelectorMatcher;
constructor(directives:List<DirectiveMetadata>) {
super();
this._selectorMatcher = new SelectorMatcher();
for (var i=0; i<directives.length; i++) {
var directiveMetadata = directives[i];

View File

@ -89,6 +89,7 @@ export class ElementBinderBuilder extends CompileStep {
_parser:Parser;
_compilationUnit:any;
constructor(parser:Parser, compilationUnit:any) {
super();
this._parser = parser;
this._compilationUnit = compilationUnit;
}

View File

@ -32,6 +32,7 @@ export class PropertyBindingParser extends CompileStep {
_parser:Parser;
_compilationUnit:any;
constructor(parser:Parser, compilationUnit:any) {
super();
this._parser = parser;
this._compilationUnit = compilationUnit;
}

View File

@ -25,6 +25,7 @@ export class ProtoViewBuilder extends CompileStep {
changeDetection:ChangeDetection;
_shadowDomStrategy:ShadowDomStrategy;
constructor(changeDetection:ChangeDetection, shadowDomStrategy:ShadowDomStrategy) {
super();
this._shadowDomStrategy = shadowDomStrategy;
this.changeDetection = changeDetection;
}

View File

@ -17,6 +17,7 @@ export class TextInterpolationParser extends CompileStep {
_parser:Parser;
_compilationUnit:any;
constructor(parser:Parser, compilationUnit:any) {
super();
this._parser = parser;
this._compilationUnit = compilationUnit;
}

View File

@ -36,6 +36,7 @@ export class ViewSplitter extends CompileStep {
_parser:Parser;
_compilationUnit:any;
constructor(parser:Parser, compilationUnit:any) {
super();
this._parser = parser;
this._compilationUnit = compilationUnit;
}

View File

@ -10,7 +10,7 @@ var _scriptTemplate = DOM.createScriptTag('type', 'ng/content')
class ContentStrategy {
nodes: List<Node>;
insert(nodes:List<Nodes>){}
insert(nodes:List<Node>){}
}
/**
@ -23,6 +23,7 @@ class RenderedContent extends ContentStrategy {
endScript:Element;
constructor(contentEl:Element) {
super();
this._replaceContentElementWithScriptTags(contentEl);
this.nodes = [];
}
@ -64,6 +65,7 @@ class IntermediateContent extends ContentStrategy {
destinationLightDom:LightDom;
constructor(destinationLightDom:LightDom) {
super();
this.destinationLightDom = destinationLightDom;
this.nodes = [];
}

View File

@ -18,6 +18,7 @@ export class EmulatedShadowDomStrategy extends ShadowDomStrategy {
_styleHost: Element;
constructor(styleHost: Element = null) {
super();
if (isBlank(styleHost)) {
styleHost = DOM.defaultDoc().head;
}

View File

@ -1,6 +1,6 @@
import {Promise, PromiseWrapper} from 'angular2/src/facade/async';
import {isBlank, isPresent, BaseException, stringify} from 'angular2/src/facade/lang';
import {TemplateElement, DOM} from 'angular2/src/facade/dom';
import {TemplateElement, DOM, Element} from 'angular2/src/facade/dom';
import {StringMapWrapper} from 'angular2/src/facade/collection';
import {TemplateConfig} from 'angular2/src/core/annotations/template_config';