This commit is contained in:
janyou 2016-12-14 11:58:53 +08:00
parent 57d8cc2e0c
commit 0c835a248a
2 changed files with 13 additions and 1 deletions

View File

@ -112,7 +112,7 @@ public class ParseTreesDescriptors {
@Override @Override
public boolean ignore(String targetName) { public boolean ignore(String targetName) {
return !targetName.matches("Java|Python2|Python3|Node"); return !targetName.matches("Java|Python2|Python3|Node|Swift");
} }
} }

View File

@ -79,6 +79,18 @@ open class ParserRuleContext: RuleContext {
self.start = ctx.start self.start = ctx.start
self.stop = ctx.stop self.stop = ctx.stop
// copy any error nodes to alt label node
if ctx.children != nil{
self.children = Array<ParseTree>()
// reset parent pointer for any error nodes
for child: ParseTree in ctx.children! {
if child is ErrorNode{
self.children?.append(child)
( (child as! ErrorNode)).parent = self
}
}
}
} }
public init(_ parent: ParserRuleContext?, _ invokingStateNumber: Int) { public init(_ parent: ParserRuleContext?, _ invokingStateNumber: Int) {