forked from jasder/antlr
Update Swift.stg
_localctx is needed as var inside a test
This commit is contained in:
parent
fde1b3a580
commit
37f3aae7cd
|
@ -395,7 +395,7 @@ RuleFunction(currentRule,args,code,locals,ruleCtx,altLabelCtxs,namedActions,fina
|
|||
<altLabelCtxs:{l | <altLabelCtxs.(l)>}; separator="\n">
|
||||
@discardableResult
|
||||
<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>)
|
||||
<namedActions.init>
|
||||
<locals; separator="\n">
|
||||
|
|
Loading…
Reference in New Issue