From 089bcb18f1caed00060459f209acb82e3d4763c9 Mon Sep 17 00:00:00 2001 From: Francis Bourre Date: Mon, 12 Jun 2017 13:50:27 +0200 Subject: [PATCH] Custom parsers recursivity added with few implementations: injectInto and mapType --- src/hex/compiler/parser/flow/ObjectParser.hx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/hex/compiler/parser/flow/ObjectParser.hx b/src/hex/compiler/parser/flow/ObjectParser.hx index ba71bfa..b4d54e2 100644 --- a/src/hex/compiler/parser/flow/ObjectParser.hx +++ b/src/hex/compiler/parser/flow/ObjectParser.hx @@ -45,6 +45,8 @@ class ObjectParser extends AbstractExprParser methodParser: [ 'mapping' => hex.compiletime.flow.parser.custom.MappingParser.parse, + 'injectInto' => hex.compiletime.flow.parser.custom.InjectIntoParser.parse, + 'mapType' => hex.compiletime.flow.parser.custom.MapTypeParser.parse, 'xml' => hex.compiletime.flow.parser.custom.XmlParser.parse ] }; @@ -117,7 +119,7 @@ class ObjectParser extends AbstractExprParser } case ENew( t, params ): - constructorVO = this.parser.parseType( this.parser, ident, value ); + constructorVO = this.parser.parseType( this.parser, new ConstructorVO( ident ), value ); constructorVO.type = ExprTools.toString( value ).split( 'new ' )[ 1 ].split( '(' )[ 0 ]; case EObjectDecl( fields ): @@ -155,7 +157,7 @@ class ObjectParser extends AbstractExprParser } case ECall( _.expr => EConst(CIdent(keyword)), params ): - return this.parser.methodParser.get( keyword )( this.parser, ident, params, value ); + return this.parser.methodParser.get( keyword )( this.parser, new ConstructorVO( ident ), params, value ); case ECall( _.expr => EField( e, field ), params ): switch( e.expr )