Fixes #1298
This commit is contained in:
parent
57d8cc2e0c
commit
0c835a248a
|
@ -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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue