package ini

import (
	
	
)
ParseStack is a stack that contains a container, the stack portion, and the list which is the list of ASTs that have been successfully parsed.
type ParseStack struct {
	top       int
	container []AST
	list      []AST
	index     int
}

func (,  int) ParseStack {
	return ParseStack{
		container: make([]AST, ),
		list:      make([]AST, ),
	}
}
Pop will return and truncate the last container element.
func ( *ParseStack) () AST {
	.top--
	return .container[.top]
}
Push will add the new AST to the container
func ( *ParseStack) ( AST) {
	.container[.top] = 
	.top++
}
MarkComplete will append the AST to the list of completed statements
func ( *ParseStack) ( AST) {
	.list[.index] = 
	.index++
}
List will return the completed statements
func ( ParseStack) () []AST {
	return .list[:.index]
}
Len will return the length of the container
func ( *ParseStack) () int {
	return .top
}

func ( ParseStack) () string {
	 := bytes.Buffer{}
	for ,  := range .list {
		.WriteString(fmt.Sprintf("%d: %v\n", +1, ))
	}

	return .String()