Open DanielBaciu opened 3 years ago
Please attach the complete class file as a repro and indicate the version of Proparse you are using.
Are you intending to fix this and issue a pull-request?
I'm using proparse.dll version 4.1.0.1219. Please fix it if possible.
The complete error stack is:
Original Exception: expecting RIGHTPAREN, found ','
C:\work\ReverseEngineeringOE\src\DymanicPropertyExample1.p:9:41: expecting RIGHTPAREN, found ',' at antlr.Parser.match(Parser.java:211) at com.joanju.proparse.ProParser.exprt2(ProParser.java:20167) at com.joanju.proparse.ProParser.exprt(ProParser.java:16834) at com.joanju.proparse.ProParser.unaryExpression(ProParser.java:19788) at com.joanju.proparse.ProParser.multiplicativeExpression(ProParser.java:19690) at com.joanju.proparse.ProParser.additiveExpression(ProParser.java:19637) at com.joanju.proparse.ProParser.relationalExpression(ProParser.java:19462) at com.joanju.proparse.ProParser.notExpression(ProParser.java:19433) at com.joanju.proparse.ProParser.andExpression(ProParser.java:19390) at com.joanju.proparse.ProParser.orExpression(ProParser.java:19357) at com.joanju.proparse.ProParser.expression(ProParser.java:3406) at com.joanju.proparse.ProParser.putstate(ProParser.java:11815) at com.joanju.proparse.ProParser.statement(ProParser.java:3310) at com.joanju.proparse.ProParser.blockorstate(ProParser.java:560) at com.joanju.proparse.ProParser.program(ProParser.java:120) at com.joanju.proparse.DoParse.doParse(DoParse.java:202) at org.prorefactor.treeparser.ParseUnit.parse(ParseUnit.java:270) at org.prorefactor.treeparser.ParseUnit.parse(ParseUnit.java:226) at org.prorefactor.treeparser.ParseUnit.treeParser01(ParseUnit.java:348) at cli.Progress.ClrBridge.ClrApi.InvokeMethod(Unknown Source)
The code using dynamic-property to access - for read or write - object properties is not parsed.
Here are some code I have tested with corresponding error message:
put unformatted dynamic-property(oObject, "pProperty").
DymanicPropertyExample1.p:9:41: expecting RIGHTPAREN, found ','
put unformatted cPrefix + ';' + quoter(string(igStock - dynamic-property(oObject, "test" + cPropertyNum))).
DymanicPropertyExample2.p:10:46: expecting RIGHTPAREN, found '('
put unformatted cPrefix + ';' + quoter(string(igStockTruck[1] - dynamic-property(oObject, "test" + cPropertyNum))).
DymanicPropertyExample3.p:10:46: expecting RIGHTPAREN, found '('
put unformatted dynamic-property("MyClass", "test" + cPropertyNum))).
DymanicPropertyExample3.p:10:46: expecting RIGHTPAREN, found '('
dynamic-property(oObject, cProperty) = "test value".
DymanicPropertyExample5.p:6:17: unexpected token: (
Thank you for checking.