|
@@ -178,7 +178,13 @@ public class ExpressionFormatter implements ExpressionVisitor<ExpressionString>
|
178
|
178
|
}
|
179
|
179
|
case INDEXGET: {
|
180
|
180
|
StringBuilder result = new StringBuilder();
|
181
|
|
- result.append(((GetLocalVariableExpression) expression.target).variable.name);
|
|
181
|
+ if(expression.target instanceof GetLocalVariableExpression) {
|
|
182
|
+ result.append(((GetLocalVariableExpression) expression.target).variable.name);
|
|
183
|
+ } else if(expression.target instanceof GetFunctionParameterExpression) {
|
|
184
|
+ result.append(((GetFunctionParameterExpression) expression.target).parameter.name);
|
|
185
|
+ } else {
|
|
186
|
+ result.append(expression.target);
|
|
187
|
+ }
|
182
|
188
|
result.append("[");
|
183
|
189
|
//why -1?
|
184
|
190
|
for (int i = 0; i < expression.arguments.arguments.length; i++) {
|