refactor(compiler): make OutputAst contain the moduleName, not the filePath (#16832).

The goal of this change is to simplify the emitters,
as we will soon create a new one to emit TypeScript nodes directly.
This commit is contained in:
Tobias Bosch
2017-05-16 16:30:37 -07:00
committed by Chuck Jazdzewski
parent 3b28c75d1f
commit 6123b9c0c6
28 changed files with 589 additions and 774 deletions

View File

@ -6,6 +6,8 @@
* found in the LICENSE file at https://angular.io/license
*/
import * as o from './output/output_ast';
export const MODULE_SUFFIX = '';
const CAMEL_CASE_REGEXP = /([A-Z])/g;
@ -138,3 +140,9 @@ export function utf8Encode(str: string): string {
return encoded;
}
export interface OutputContext {
genFilePath: string;
statements: o.Statement[];
importExpr(reference: any, typeParams?: o.Type[]|null): o.Expression;
}