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:
@ -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));
|
||||
|
Reference in New Issue
Block a user