Open IVNSTN opened 3 weeks ago
I think the issue is that
is missing a UpdateTokenInfo
for End
and vResult
.
it should be:
endConversationStatement returns [EndConversationStatement vResult = FragmentFactory.CreateFragment<EndConversationStatement>()]
{
ScalarExpression vConv;
}
: tEnd:End tConversation:Identifier vConv = expression
{
UpdateTokenInfo(vResult,tEnd);
Match(tConversation,CodeGenerationSupporter.Conversation);
vResult.Conversation = vConv;
}
endConversationArgumentsOpt[vResult]
;
It's a similar issue to #91, and from looking at the grammar files I feel it probably happens in a few other places.
ScriptDom version: 161.9123 Parser compatibility level: 150
Code example
Actually, I noticed it on a longer IF-ELSE-END CONVERSATION piece of code, but here is the problem: FirstTokenIndex points not to
END
keyword but to@handle
variable reference which is wrong. On screenshot below FirstTokenIndex should be 178, not 182.LastTokenIndex points here to semicolon position which is correct.