From d1dbfccdd6e0941a4879e1f9a768b95fb0bd846d Mon Sep 17 00:00:00 2001 From: janyou Date: Fri, 11 Nov 2016 21:48:45 +0800 Subject: [PATCH] Update Swift.test.stg --- .../antlr/v4/test/runtime/swift/Swift.test.stg | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/runtime-testsuite/resources/org/antlr/v4/test/runtime/swift/Swift.test.stg b/runtime-testsuite/resources/org/antlr/v4/test/runtime/swift/Swift.test.stg index 4eef14c50..4a51ace90 100755 --- a/runtime-testsuite/resources/org/antlr/v4/test/runtime/swift/Swift.test.stg +++ b/runtime-testsuite/resources/org/antlr/v4/test/runtime/swift/Swift.test.stg @@ -346,8 +346,22 @@ let walker = ParseTreeWalker() try! walker.walk(LeafListener(), ) >> + TreeNodeWithAltNumField(X) ::= << -// TODO +@parser::members { +open class MyRuleNode: ParserRuleContext { + public var altNum: Int = 0 + override + public init(_ parent: ParserRuleContext?, _ invokingStateNumber: Int) { + super.init(parent, invokingStateNumber) + } + override + open func getAltNumber() -> Int { return altNum } + + override + open func setAltNumber(_ altNum: Int) { self.altNum = altNum } +} +} >> TokenGetterListener(X) ::= <<