Skip to content

Commit

Permalink
fix(ExpressionVisitor): not redeclare imports
Browse files Browse the repository at this point in the history
fixes #537
  • Loading branch information
ben-girardet authored and jdanyow committed Dec 8, 2019
1 parent 5b09f86 commit 15109b3
Showing 1 changed file with 11 additions and 31 deletions.
42 changes: 11 additions & 31 deletions src/implementation/expression-visitor.ts
Original file line number Diff line number Diff line change
@@ -1,40 +1,20 @@
import {
Expression,
// Chain,
ValueConverter,
// Assign,
Conditional,
// AccessThis,
// AccessScope,
AccessScope,
AccessMember,
AccessKeyed,
// CallScope,
// CallFunction,
CallMember,
// PrefixNot,
BindingBehavior,
Binary,
// LiteralPrimitive,
// LiteralArray,
// LiteralObject,
// LiteralString
LiteralPrimitive,
LiteralString
} from 'aurelia-binding';

export type Chain = any;
export type Assign = any;
export type AccessThis = any;
export type AccessScope = any;
export type CallScope = any;
export type CallFunction = any;
export type PrefixNot = any;
export type LiteralPrimitive = any;
export type LiteralArray = any;
export type LiteralObject = any;
export type LiteralString = any;

// tslint:disable:no-empty
export class ExpressionVisitor {
public visitChain(chain: Chain) {
public visitChain(chain: any) {
this.visitArgs(chain.expressions);
}

Expand All @@ -48,7 +28,7 @@ export class ExpressionVisitor {
this.visitArgs(converter.args);
}

public visitAssign(assign: Assign) {
public visitAssign(assign: any) {
assign.target.accept(this);
assign.value.accept(this);
}
Expand All @@ -59,7 +39,7 @@ export class ExpressionVisitor {
conditional.no.accept(this);
}

public visitAccessThis(access: AccessThis) {
public visitAccessThis(access: any) {
access.ancestor = access.ancestor;
}

Expand All @@ -76,11 +56,11 @@ export class ExpressionVisitor {
access.key.accept(this);
}

public visitCallScope(call: CallScope) {
public visitCallScope(call: any) {
this.visitArgs(call.args);
}

public visitCallFunction(call: CallFunction) {
public visitCallFunction(call: any) {
call.func.accept(this);
this.visitArgs(call.args);
}
Expand All @@ -90,7 +70,7 @@ export class ExpressionVisitor {
this.visitArgs(call.args);
}

public visitPrefix(prefix: PrefixNot) {
public visitPrefix(prefix: any) {
prefix.expression.accept(this);
}

Expand All @@ -103,11 +83,11 @@ export class ExpressionVisitor {
literal.value = literal.value;
}

public visitLiteralArray(literal: LiteralArray) {
public visitLiteralArray(literal: any) {
this.visitArgs(literal.elements);
}

public visitLiteralObject(literal: LiteralObject) {
public visitLiteralObject(literal: any) {
this.visitArgs(literal.values);
}

Expand Down

0 comments on commit 15109b3

Please sign in to comment.