Ejemplo n.º 1
0
	// Get the length of an expression list.
	public static int ExprListLength(JExprList list)
			{
				JExprListElem elem = list.first;
				int len = 0;
				while(elem != null)
				{
					++len;
					elem = elem.next;
				}
				return len;
			}
Ejemplo n.º 2
0
	// Add an expression to a list.
	public static void AddExprToList(JExprList list, Object name, JNode expr)
			{
				JExprListElem elem = new JExprListElem
					(null, name, expr, null);
				if(list.last != null)
				{
					list.last.next = elem;
				}
				else
				{
					list.first = elem;
				}
				list.last = elem;
			}