@@ -58,7 +58,6 @@ export class KeyedWrite extends AST {
5858
5959export class BindingPipe extends AST {
6060 constructor ( public exp : AST , public name : string , public args : any [ ] ) { super ( ) ; }
61-
6261 visit ( visitor : AstVisitor ) : any { return visitor . visitPipe ( this ) ; }
6362}
6463
@@ -79,7 +78,7 @@ export class LiteralMap extends AST {
7978
8079export class Interpolation extends AST {
8180 constructor ( public strings : any [ ] , public expressions : any [ ] ) { super ( ) ; }
82- visit ( visitor : AstVisitor ) { visitor . visitInterpolation ( this ) ; }
81+ visit ( visitor : AstVisitor ) : any { return visitor . visitInterpolation ( this ) ; }
8382}
8483
8584export class Binary extends AST {
@@ -214,68 +213,66 @@ export class RecursiveAstVisitor implements AstVisitor {
214213}
215214
216215export class AstTransformer implements AstVisitor {
217- visitImplicitReceiver ( ast : ImplicitReceiver ) : ImplicitReceiver { return ast ; }
216+ visitImplicitReceiver ( ast : ImplicitReceiver ) : AST { return ast ; }
218217
219- visitInterpolation ( ast : Interpolation ) : Interpolation {
218+ visitInterpolation ( ast : Interpolation ) : AST {
220219 return new Interpolation ( ast . strings , this . visitAll ( ast . expressions ) ) ;
221220 }
222221
223- visitLiteralPrimitive ( ast : LiteralPrimitive ) : LiteralPrimitive {
224- return new LiteralPrimitive ( ast . value ) ;
225- }
222+ visitLiteralPrimitive ( ast : LiteralPrimitive ) : AST { return new LiteralPrimitive ( ast . value ) ; }
226223
227- visitPropertyRead ( ast : PropertyRead ) : PropertyRead {
224+ visitPropertyRead ( ast : PropertyRead ) : AST {
228225 return new PropertyRead ( ast . receiver . visit ( this ) , ast . name , ast . getter ) ;
229226 }
230227
231- visitPropertyWrite ( ast : PropertyWrite ) : PropertyWrite {
228+ visitPropertyWrite ( ast : PropertyWrite ) : AST {
232229 return new PropertyWrite ( ast . receiver . visit ( this ) , ast . name , ast . setter , ast . value ) ;
233230 }
234231
235- visitSafePropertyRead ( ast : SafePropertyRead ) : SafePropertyRead {
232+ visitSafePropertyRead ( ast : SafePropertyRead ) : AST {
236233 return new SafePropertyRead ( ast . receiver . visit ( this ) , ast . name , ast . getter ) ;
237234 }
238235
239- visitMethodCall ( ast : MethodCall ) : MethodCall {
236+ visitMethodCall ( ast : MethodCall ) : AST {
240237 return new MethodCall ( ast . receiver . visit ( this ) , ast . name , ast . fn , this . visitAll ( ast . args ) ) ;
241238 }
242239
243- visitSafeMethodCall ( ast : SafeMethodCall ) : SafeMethodCall {
240+ visitSafeMethodCall ( ast : SafeMethodCall ) : AST {
244241 return new SafeMethodCall ( ast . receiver . visit ( this ) , ast . name , ast . fn , this . visitAll ( ast . args ) ) ;
245242 }
246243
247- visitFunctionCall ( ast : FunctionCall ) : FunctionCall {
244+ visitFunctionCall ( ast : FunctionCall ) : AST {
248245 return new FunctionCall ( ast . target . visit ( this ) , this . visitAll ( ast . args ) ) ;
249246 }
250247
251- visitLiteralArray ( ast : LiteralArray ) : LiteralArray {
248+ visitLiteralArray ( ast : LiteralArray ) : AST {
252249 return new LiteralArray ( this . visitAll ( ast . expressions ) ) ;
253250 }
254251
255- visitLiteralMap ( ast : LiteralMap ) : LiteralMap {
252+ visitLiteralMap ( ast : LiteralMap ) : AST {
256253 return new LiteralMap ( ast . keys , this . visitAll ( ast . values ) ) ;
257254 }
258255
259- visitBinary ( ast : Binary ) : Binary {
256+ visitBinary ( ast : Binary ) : AST {
260257 return new Binary ( ast . operation , ast . left . visit ( this ) , ast . right . visit ( this ) ) ;
261258 }
262259
263- visitPrefixNot ( ast : PrefixNot ) : PrefixNot { return new PrefixNot ( ast . expression . visit ( this ) ) ; }
260+ visitPrefixNot ( ast : PrefixNot ) : AST { return new PrefixNot ( ast . expression . visit ( this ) ) ; }
264261
265- visitConditional ( ast : Conditional ) : Conditional {
262+ visitConditional ( ast : Conditional ) : AST {
266263 return new Conditional ( ast . condition . visit ( this ) , ast . trueExp . visit ( this ) ,
267264 ast . falseExp . visit ( this ) ) ;
268265 }
269266
270- visitPipe ( ast : BindingPipe ) : BindingPipe {
267+ visitPipe ( ast : BindingPipe ) : AST {
271268 return new BindingPipe ( ast . exp . visit ( this ) , ast . name , this . visitAll ( ast . args ) ) ;
272269 }
273270
274- visitKeyedRead ( ast : KeyedRead ) : KeyedRead {
271+ visitKeyedRead ( ast : KeyedRead ) : AST {
275272 return new KeyedRead ( ast . obj . visit ( this ) , ast . key . visit ( this ) ) ;
276273 }
277274
278- visitKeyedWrite ( ast : KeyedWrite ) : KeyedWrite {
275+ visitKeyedWrite ( ast : KeyedWrite ) : AST {
279276 return new KeyedWrite ( ast . obj . visit ( this ) , ast . key . visit ( this ) , ast . value . visit ( this ) ) ;
280277 }
281278
@@ -287,5 +284,5 @@ export class AstTransformer implements AstVisitor {
287284 return res ;
288285 }
289286
290- visitChain ( ast : Chain ) : Chain { return new Chain ( this . visitAll ( ast . expressions ) ) ; }
287+ visitChain ( ast : Chain ) : AST { return new Chain ( this . visitAll ( ast . expressions ) ) ; }
291288}
0 commit comments