Merge pull request from martinvw/patch-1

[Swift] Update codegen template
This commit is contained in:
Terence Parr 2020-10-20 12:38:11 -07:00 committed by GitHub
commit 71b48abb31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions
contributors.txt
tool/resources/org/antlr/v4/tool/templates/codegen/Swift

View File

@ -249,6 +249,7 @@ YYYY/MM/DD, github id, Full name, email
2020/02/21, StochasticTinkr, Daniel Pitts, github@coloraura.com
2020/03/17, XsongyangX, Song Yang, songyang1218@gmail.com
2020/04/07, deniskyashif, Denis Kyashif, denis.kyashif@gmail.com
2020/04/23, martinvw, Martin van Wingerden, martin@martinvw.nl
2020/04/30, TristonianJones, Tristan Swadell, tswadell@google.com
2020/05/06, iammosespaulr, Moses Paul R, iammosespaulr@gmail.com
2020/06/04, sigmasoldi3r, Pablo Blanco, pablobc.1995@gmail.com

View File

@ -438,10 +438,10 @@ LeftRecursiveRuleFunction(currentRule,args,code,locals,ruleCtx,altLabelCtxs,
@discardableResult
private func <currentRule.name>(_ _p<args:{a | , <a>}>: Int) throws -> <currentRule.ctxType> {
let _parentctx: ParserRuleContext? = _ctx
var _parentState: Int = getState()
let _parentState: Int = getState()
var _localctx: <currentRule.ctxType> = <currentRule.ctxType>(_ctx, _parentState<currentRule.args:{a | , <a.name>}>)
var _prevctx: <currentRule.ctxType> = _localctx
var _startState: Int = <currentRule.startState>
var _prevctx: <currentRule.ctxType> = _localctx
let _startState: Int = <currentRule.startState>
try enterRecursionRule(_localctx, <currentRule.startState>, <parser.name>.RULE_<currentRule.name>, _p)
<namedActions.init>
<locals; separator="\n">