chore: run clang-format on code base.
This fixes several minor indentation issues (instanceof precendence, type declaration specificity, template string length calculation). This should also fix some flip-flop situations with template strings.
This commit is contained in:
@ -122,8 +122,8 @@ export class PreGeneratedChangeDetection extends ChangeDetection {
|
||||
_dynamicChangeDetection: ChangeDetection;
|
||||
_protoChangeDetectorFactories: StringMap<string, Function>;
|
||||
|
||||
constructor(@Inject(PROTO_CHANGE_DETECTOR_KEY) @Optional()
|
||||
protoChangeDetectorsForTest?: StringMap<string, Function>) {
|
||||
constructor(@Inject(PROTO_CHANGE_DETECTOR_KEY) @Optional() protoChangeDetectorsForTest?:
|
||||
StringMap<string, Function>) {
|
||||
super();
|
||||
this._dynamicChangeDetection = new DynamicChangeDetection();
|
||||
this._protoChangeDetectorFactories = isPresent(protoChangeDetectorsForTest) ?
|
||||
|
@ -82,7 +82,7 @@ export class AccessMember extends AST {
|
||||
|
||||
eval(context, locals: Locals): any {
|
||||
if (this.receiver instanceof ImplicitReceiver && isPresent(locals) &&
|
||||
locals.contains(this.name)) {
|
||||
locals.contains(this.name)) {
|
||||
return locals.get(this.name);
|
||||
} else {
|
||||
var evaluatedReceiver = this.receiver.eval(context, locals);
|
||||
@ -96,7 +96,7 @@ export class AccessMember extends AST {
|
||||
var evaluatedContext = this.receiver.eval(context, locals);
|
||||
|
||||
if (this.receiver instanceof ImplicitReceiver && isPresent(locals) &&
|
||||
locals.contains(this.name)) {
|
||||
locals.contains(this.name)) {
|
||||
throw new BaseException(`Cannot reassign a variable binding ${this.name}`);
|
||||
} else {
|
||||
return this.setter(evaluatedContext, value);
|
||||
@ -267,7 +267,7 @@ export class MethodCall extends AST {
|
||||
eval(context, locals: Locals): any {
|
||||
var evaluatedArgs = evalList(context, locals, this.args);
|
||||
if (this.receiver instanceof ImplicitReceiver && isPresent(locals) &&
|
||||
locals.contains(this.name)) {
|
||||
locals.contains(this.name)) {
|
||||
var fn = locals.get(this.name);
|
||||
return FunctionWrapper.apply(fn, evaluatedArgs);
|
||||
} else {
|
||||
|
@ -108,8 +108,7 @@ class _ConvertAstIntoProtoRecords implements AstVisitor {
|
||||
visitAccessMember(ast: AccessMember): number {
|
||||
var receiver = ast.receiver.visit(this);
|
||||
if (isPresent(this._variableNames) && ListWrapper.contains(this._variableNames, ast.name) &&
|
||||
ast.receiver instanceof
|
||||
ImplicitReceiver) {
|
||||
ast.receiver instanceof ImplicitReceiver) {
|
||||
return this._addRecord(RecordType.LOCAL, ast.name, ast.name, [], null, receiver);
|
||||
} else {
|
||||
return this._addRecord(RecordType.PROPERTY, ast.name, ast.getter, [], null, receiver);
|
||||
|
Reference in New Issue
Block a user