package parser

import (
	
	
	
)

type blockquoteParser struct {
}

var defaultBlockquoteParser = &blockquoteParser{}

// NewBlockquoteParser returns a new BlockParser that
// parses blockquotes.
func () BlockParser {
	return defaultBlockquoteParser
}

func ( *blockquoteParser) ( text.Reader) bool {
	,  := .PeekLine()
	,  := util.IndentWidth(, .LineOffset())
	if  > 3 ||  >= len() || [] != '>' {
		return false
	}
	++
	if  >= len() || [] == '\n' {
		.Advance()
		return true
	}
	.Advance()
	if [] == ' ' || [] == '\t' {
		 := 0
		if [] == '\t' {
			 = util.TabWidth(.LineOffset()) - 1
		}
		.AdvanceAndSetPadding(1, )
	}
	return true
}

func ( *blockquoteParser) () []byte {
	return []byte{'>'}
}

func ( *blockquoteParser) ( ast.Node,  text.Reader,  Context) (ast.Node, State) {
	if .process() {
		return ast.NewBlockquote(), HasChildren
	}
	return nil, NoChildren
}

func ( *blockquoteParser) ( ast.Node,  text.Reader,  Context) State {
	if .process() {
		return Continue | HasChildren
	}
	return Close
}

func ( *blockquoteParser) ( ast.Node,  text.Reader,  Context) {
	// nothing to do
}

func ( *blockquoteParser) () bool {
	return true
}

func ( *blockquoteParser) () bool {
	return false
}