@param ast Child node to add.
(AST ast)
| 53 | * Child node to add. |
| 54 | */ |
| 55 | public void addChild(AST ast) { |
| 56 | // Link parent/child |
| 57 | getChildren().add(ast); |
| 58 | ast.setParent(this); |
| 59 | // Link prev/next for children |
| 60 | if (getChildren().size() > 1) { |
| 61 | AST prev = getChildren().get(getChildren().size() - 2); |
| 62 | prev.setNext(ast); |
| 63 | ast.setPrev(prev); |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * @param type |
no test coverage detected