We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12a289d commit f2ed303Copy full SHA for f2ed303
src/Application/HydraScript.Application.CodeGeneration/Visitors/InstructionProvider.cs
@@ -228,10 +228,13 @@ public AddressedInstructions Visit(PrintStatement visitable)
228
if (visitable.Expression is PrimaryExpression prim)
229
result.Add(new AsString(_valueDtoConverter.Convert(prim.ToValueDto())));
230
else
231
+ {
232
result.AddRange(visitable.Expression.Accept(_expressionVisitor));
233
+ var name = new Name(result.OfType<Simple>().Last().Left!);
234
+ result.Add(new AsString(name));
235
+ }
236
- var last = new Name(result.OfType<Simple>().Last().Left!);
- result.Add(new Print(last));
237
+ result.Add(new Print(new Name((result[result.End] as AsString)!.Left!)));
238
239
return result;
240
}
0 commit comments