public function shift(TreeNodeInterface $node, int $stateIndex): void
    {
        $item = new StackItem();
        $item->state = $stateIndex;
        $item->node = $node;

        if ($this->actions) {
            $this->actions->applyToNode($node);
        }

        $this->items[] = $item;
        $this->stateIndex = $stateIndex;
        $this->stateRow = $this->table->getRow($stateIndex);
    }
public function shift(TreeNodeInterface $node, int $stateIndex): void
    {
        $item = new StackItem();
        $item->state = $stateIndex;
        $item->node = $node;

        if ($this->actions) {
            $this->actions->applyToNode($node);
        }

        $this->items[] = $item;
        $this->stateIndex = $stateIndex;
        $this->stateRow = $this->table->getRow($stateIndex);
    }
public function shift ( TreeNodeInterface $ node , int $ stateIndex ) : void { $ item = new StackItem ( ) ; $ item -> state = $ stateIndex ; $ item -> node = $ node ; if ( $ this -> actions ) { $ this -> actions -> applyToNode ( $ node ) ; } $ this -> items [ ] = $ item ; $ this -> stateIndex = $ stateIndex ; $ this -> stateRow = $ this -> table -> getRow ( $ stateIndex ) ; }
Perform a Shift of a node into the stack
@param TreeNodeInterface $node Node to add into the stack
@param int $stateIndex Next state index to switch to
@throws AbortParsingException
Perform a Shift of a node into the stack