org.nuiton.jaxx.compiler.java.parser.Node Maven / Gradle / Ivy
The newest version!
/*
* #%L
* JAXX :: Compiler
* %%
* Copyright (C) 2008 - 2024 Code Lutin, Ultreia.io
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* .
* #L%
*/
/* Generated By:JJTree: Do not edit this line. Node.java */
package org.nuiton.jaxx.compiler.java.parser;
/* All AST nodes must implement this interface. It provides basic
machinery for constructing the parent and child relationships
between nodes. */
public interface Node {
/**
* This method is called after the node has been made the current
* node. It indicates that child nodes can now be added to it.
*/
void jjtOpen();
/**
* This method is called after all the child nodes have been
* added.
*/
void jjtClose();
/**
* This pair of methods are used to inform the node of its
* parent.
*
* @param n node
*/
void jjtSetParent(Node n);
Node jjtGetParent();
/**
* This method tells the node to add its argument to the node's
* list of children.
*
* @param n node
* @param i index ?
*/
void jjtAddChild(Node n, int i);
/**
* @param i index of child
* @return a child node. The children are numbered
* from zero, left to right.
*/
Node jjtGetChild(int i);
/** @return the number of children the node has. */
int jjtGetNumChildren();
}