### ----------------------------------------------------
### -- PDF::Grammar
### -- Licenses: Artistic-2.0
### -- Authors: David Warring
### -- File: lib/PDF/Grammar/PDF/Actions.rakumod
### ----------------------------------------------------
use PDF::Grammar::COS::Actions;

class PDF::Grammar::PDF::Actions
    is PDF::Grammar::COS::Actions {

    method xref-first($/) {
	my @entries = $<xref-entry>».ast;
        my $obj-num = 0;
        @entries[$_;0] = $obj-num++
            for ^@entries;
        my @xref = {
	    :obj-count(+@entries),
	    :@entries,
        }, $<xref-section>».ast.Slip;

	make (:@xref);
    }
}


