Perseus
    Preparing search index...

    This class is an internal utility that just treats an array as a stack and gives us a top() method so we don't have to write expressions like ancestors[ancestors.length-1]. The values() method automatically copies the internal array so we don't have to worry about client code modifying our internal stacks. The use of this Stack abstraction makes the TraversalState class simpler in a number of places.

    Type Parameters

    • T
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    stack: T[]

    Methods