forked from jasder/antlr
Update Trees.swift
This commit is contained in:
parent
e3cc81bc32
commit
033e5ed136
|
@ -121,6 +121,10 @@ public class Trees {
|
|||
if let ruleNode = t as? RuleNode {
|
||||
let ruleIndex: Int = ruleNode.getRuleContext().getRuleIndex()
|
||||
let ruleName: String = ruleNames![ruleIndex]
|
||||
let altNumber = (t as! RuleContext).getAltNumber()
|
||||
if altNumber != ATN.INVALID_ALT_NUMBER {
|
||||
return "\(ruleName):\(altNumber)"
|
||||
}
|
||||
return ruleName
|
||||
} else {
|
||||
if let errorNode = t as? ErrorNode {
|
||||
|
|
Loading…
Reference in New Issue