feat(compiler): initial version of the compiler.

Supports:
- binds text nodes, element properties and directive properties
- locates decorator, component and template directives.
- inline templates of components

The compiler is built using a pipeline design,
see core/src/compiler/pipeline package.

Integration tests to show how the compiler, change_detection and DI work
together:
core/test/compiler/integration_spec.js
This commit is contained in:
Tobias Bosch
2014-11-11 17:33:47 -08:00
parent 62efb56b0a
commit 7a70f8f92d
53 changed files with 2877 additions and 386 deletions

View File

@ -1,6 +1,6 @@
import {ProtoRecord, Record} from './record';
import {FIELD, IMPLEMENTS, isBlank, isPresent} from 'facade/lang';
import {AST, AccessMember, ImplicitReceiver, AstVisitor} from './parser/ast';
import {AST, AccessMember, ImplicitReceiver, AstVisitor, Binary, LiteralPrimitive} from './parser/ast';
export class ProtoWatchGroup {
@FIELD('headRecord:ProtoRecord')
@ -126,6 +126,17 @@ class ProtoRecordCreator {
//do nothing
}
// TODO: add tests for this method!
visitLiteralPrimitive(ast:LiteralPrimitive) {
// do nothing
}
// TODO: add tests for this method!
visitBinary(ast:Binary) {
ast.left.visit(this);
ast.right.visit(this);
}
visitAccessMember(ast:AccessMember) {
ast.receiver.visit(this);
this.add(new ProtoRecord(this.protoWatchGroup, ast.name, null));