forked from jasder/antlr
No need to override method - bug was fixed in V3 runtime
This commit is contained in:
parent
82dc6f7714
commit
b6a824ddd5
|
@ -30,13 +30,13 @@
|
|||
<dependency>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr-runtime</artifactId>
|
||||
<version>3.5-rc-2</version>
|
||||
<version>3.5-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>ST4</artifactId>
|
||||
<version>4.0.7-rc-2</version>
|
||||
<version>4.0.7-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
@ -154,19 +154,6 @@ public class GrammarAST extends CommonTree {
|
|||
return false;
|
||||
}
|
||||
|
||||
/** Fix bug */
|
||||
@Override
|
||||
public void insertChild(int i, Object t) {
|
||||
if (i < 0 || i > getChildCount()) {
|
||||
throw new IndexOutOfBoundsException(i+" out or range");
|
||||
}
|
||||
if ( children==null ) children = createChildrenList();
|
||||
children.add(i, t);
|
||||
// walk others to increment their child indexes
|
||||
// set index, parent of this one too
|
||||
this.freshenParentAndChildIndexes(i);
|
||||
}
|
||||
|
||||
// TODO: move to basetree when i settle on how runtime works
|
||||
// TODO: don't include this node!!
|
||||
// TODO: reuse other method
|
||||
|
|
Loading…
Reference in New Issue