Update Swift.stg

_localctx is needed as var inside a test
This commit is contained in:
Martin van Wingerden 2020-05-21 19:30:15 +02:00 committed by GitHub
parent fde1b3a580
commit 37f3aae7cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -395,7 +395,7 @@ RuleFunction(currentRule,args,code,locals,ruleCtx,altLabelCtxs,namedActions,fina
<altLabelCtxs:{l | <altLabelCtxs.(l)>}; separator="\n"> <altLabelCtxs:{l | <altLabelCtxs.(l)>}; separator="\n">
@discardableResult @discardableResult
<if(currentRule.modifiers)><currentRule.modifiers:{f | <f> }><else> <accessLevelOpenOK(parser)> func <endif><currentRule.name>(<if(first(args))>_ <endif><args; separator=", _">) throws -> <currentRule.ctxType> { <if(currentRule.modifiers)><currentRule.modifiers:{f | <f> }><else> <accessLevelOpenOK(parser)> func <endif><currentRule.name>(<if(first(args))>_ <endif><args; separator=", _">) throws -> <currentRule.ctxType> {
let _localctx: <currentRule.ctxType> = <currentRule.ctxType>(_ctx, getState()<currentRule.args:{a | , <a.name>}>) var _localctx: <currentRule.ctxType> = <currentRule.ctxType>(_ctx, getState()<currentRule.args:{a | , <a.name>}>)
try enterRule(_localctx, <currentRule.startState>, <parser.name>.RULE_<currentRule.name>) try enterRule(_localctx, <currentRule.startState>, <parser.name>.RULE_<currentRule.name>)
<namedActions.init> <namedActions.init>
<locals; separator="\n"> <locals; separator="\n">