Package kawa.lang

Class Translator.FormStack

All Implemented Interfaces:
BoundedHashable, Consumable, Sequence<Object>, Externalizable, Serializable, Comparable, Iterable<Object>, Collection<Object>, List<Object>, SequencedCollection<Object>
Enclosing class:
Translator

public static class Translator.FormStack extends Pair
A list of "forms" to be further processed. It is implemented as an LList so we can save position information.
See Also:
  • Constructor Details

  • Method Details

    • getHead

      public Pair getHead()
      Return the "head" of the list. The cdr of the head is the first element.
    • getFirst

      public Object getFirst()
    • lastPair

      public Pair lastPair()
      The Pair whose car is the last form in the list. If the list is empty, this returns the list head.
      Overrides:
      lastPair in class Pair
    • popTail

      public Object popTail(Pair oldTail)
    • push

      public void push(Object value)
    • pushAll

      public void pushAll(LList values)
    • pushAll

      public void pushAll(LList values, Pair valuesLast)
    • pushAfter

      public void pushAfter(Object value, Pair position)