ast

package
v0.0.0-...-5294f0c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package ast defines AST nodes that represents extension's elements

Index

Constants

This section is empty.

Variables

View Source
var KindDefinitionDescription = gast.NewNodeKind("DefinitionDescription")

KindDefinitionDescription is a NodeKind of the DefinitionDescription node.

View Source
var KindDefinitionList = gast.NewNodeKind("DefinitionList")

KindDefinitionList is a NodeKind of the DefinitionList node.

View Source
var KindDefinitionTerm = gast.NewNodeKind("DefinitionTerm")

KindDefinitionTerm is a NodeKind of the DefinitionTerm node.

View Source
var KindFootnote = gast.NewNodeKind("Footnote")

KindFootnote is a NodeKind of the Footnote node.

View Source
var KindFootnoteBacklink = gast.NewNodeKind("FootnoteBacklink")

KindFootnoteBacklink is a NodeKind of the FootnoteBacklink node.

View Source
var KindFootnoteLink = gast.NewNodeKind("FootnoteLink")

KindFootnoteLink is a NodeKind of the FootnoteLink node.

View Source
var KindFootnoteList = gast.NewNodeKind("FootnoteList")

KindFootnoteList is a NodeKind of the FootnoteList node.

View Source
var KindStrikethrough = gast.NewNodeKind("Strikethrough")

KindStrikethrough is a NodeKind of the Strikethrough node.

View Source
var KindTable = gast.NewNodeKind("Table")

KindTable is a NodeKind of the Table node.

View Source
var KindTableCell = gast.NewNodeKind("TableCell")

KindTableCell is a NodeKind of the TableCell node.

View Source
var KindTableHeader = gast.NewNodeKind("TableHeader")

KindTableHeader is a NodeKind of the TableHeader node.

View Source
var KindTableRow = gast.NewNodeKind("TableRow")

KindTableRow is a NodeKind of the TableRow node.

View Source
var KindTaskCheckBox = gast.NewNodeKind("TaskCheckBox")

KindTaskCheckBox is a NodeKind of the TaskCheckBox node.

Functions

This section is empty.

Types

type Alignment

type Alignment int

Alignment is a text alignment of table cells.

const (
	// AlignLeft indicates text should be left justified.
	AlignLeft Alignment = iota + 1

	// AlignRight indicates text should be right justified.
	AlignRight

	// AlignCenter indicates text should be centered.
	AlignCenter

	// AlignNone indicates text should be aligned by default manner.
	AlignNone
)

func (Alignment) String

func (a Alignment) String() string

type DefinitionDescription

type DefinitionDescription struct {
	gast.BaseBlock
	IsTight bool
}

A DefinitionDescription struct represents a definition list description of Markdown (PHPMarkdownExtra) text.

func NewDefinitionDescription

func NewDefinitionDescription() *DefinitionDescription

NewDefinitionDescription returns a new DefinitionDescription node.

func (*DefinitionDescription) Dump

func (n *DefinitionDescription) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*DefinitionDescription) Kind

Kind implements Node.Kind.

type DefinitionList

type DefinitionList struct {
	gast.BaseBlock
	Offset             int
	TemporaryParagraph *gast.Paragraph
}

A DefinitionList struct represents a definition list of Markdown (PHPMarkdownExtra) text.

func NewDefinitionList

func NewDefinitionList(offset int, para *gast.Paragraph) *DefinitionList

NewDefinitionList returns a new DefinitionList node.

func (*DefinitionList) Dump

func (n *DefinitionList) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*DefinitionList) Kind

func (n *DefinitionList) Kind() gast.NodeKind

Kind implements Node.Kind.

type DefinitionTerm

type DefinitionTerm struct {
	gast.BaseBlock
}

A DefinitionTerm struct represents a definition list term of Markdown (PHPMarkdownExtra) text.

func NewDefinitionTerm

func NewDefinitionTerm() *DefinitionTerm

NewDefinitionTerm returns a new DefinitionTerm node.

func (*DefinitionTerm) Dump

func (n *DefinitionTerm) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*DefinitionTerm) Kind

func (n *DefinitionTerm) Kind() gast.NodeKind

Kind implements Node.Kind.

type Footnote

type Footnote struct {
	gast.BaseBlock
	Ref   []byte
	Index int
}

A Footnote struct represents a footnote of Markdown (PHP Markdown Extra) text.

func NewFootnote

func NewFootnote(ref []byte) *Footnote

NewFootnote returns a new Footnote node.

func (*Footnote) Dump

func (n *Footnote) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*Footnote) Kind

func (n *Footnote) Kind() gast.NodeKind

Kind implements Node.Kind.

type FootnoteBacklink struct {
	gast.BaseInline
	Index    int
	RefCount int
	RefIndex int
}

A FootnoteBacklink struct represents a link to a footnote of Markdown (PHP Markdown Extra) text.

func NewFootnoteBacklink(index int) *FootnoteBacklink

NewFootnoteBacklink returns a new FootnoteBacklink node.

func (*FootnoteBacklink) Dump

func (n *FootnoteBacklink) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*FootnoteBacklink) Kind

func (n *FootnoteBacklink) Kind() gast.NodeKind

Kind implements Node.Kind.

type FootnoteLink struct {
	gast.BaseInline
	Index    int
	RefCount int
	RefIndex int
}

A FootnoteLink struct represents a link to a footnote of Markdown (PHP Markdown Extra) text.

func NewFootnoteLink(index int) *FootnoteLink

NewFootnoteLink returns a new FootnoteLink node.

func (*FootnoteLink) Dump

func (n *FootnoteLink) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*FootnoteLink) Kind

func (n *FootnoteLink) Kind() gast.NodeKind

Kind implements Node.Kind.

type FootnoteList

type FootnoteList struct {
	gast.BaseBlock
	Count int
}

A FootnoteList struct represents footnotes of Markdown (PHP Markdown Extra) text.

func NewFootnoteList

func NewFootnoteList() *FootnoteList

NewFootnoteList returns a new FootnoteList node.

func (*FootnoteList) Dump

func (n *FootnoteList) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*FootnoteList) Kind

func (n *FootnoteList) Kind() gast.NodeKind

Kind implements Node.Kind.

type Strikethrough

type Strikethrough struct {
	gast.BaseInline
}

A Strikethrough struct represents a strikethrough of GFM text.

func NewStrikethrough

func NewStrikethrough() *Strikethrough

NewStrikethrough returns a new Strikethrough node.

func (*Strikethrough) Dump

func (n *Strikethrough) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*Strikethrough) Kind

func (n *Strikethrough) Kind() gast.NodeKind

Kind implements Node.Kind.

type Table

type Table struct {
	gast.BaseBlock

	// Alignments returns alignments of the columns.
	Alignments []Alignment
}

A Table struct represents a table of Markdown(GFM) text.

func NewTable

func NewTable() *Table

NewTable returns a new Table node.

func (*Table) Dump

func (n *Table) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*Table) Kind

func (n *Table) Kind() gast.NodeKind

Kind implements Node.Kind.

type TableCell

type TableCell struct {
	gast.BaseBlock
	Alignment Alignment
}

A TableCell struct represents a table cell of a Markdown(GFM) text.

func NewTableCell

func NewTableCell() *TableCell

NewTableCell returns a new TableCell node.

func (*TableCell) Dump

func (n *TableCell) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*TableCell) Kind

func (n *TableCell) Kind() gast.NodeKind

Kind implements Node.Kind.

type TableHeader

type TableHeader struct {
	gast.BaseBlock
	Alignments []Alignment
}

A TableHeader struct represents a table header of Markdown(GFM) text.

func NewTableHeader

func NewTableHeader(row *TableRow) *TableHeader

NewTableHeader returns a new TableHeader node.

func (*TableHeader) Dump

func (n *TableHeader) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*TableHeader) Kind

func (n *TableHeader) Kind() gast.NodeKind

Kind implements Node.Kind.

type TableRow

type TableRow struct {
	gast.BaseBlock
	Alignments []Alignment
}

A TableRow struct represents a table row of Markdown(GFM) text.

func NewTableRow

func NewTableRow(alignments []Alignment) *TableRow

NewTableRow returns a new TableRow node.

func (*TableRow) Dump

func (n *TableRow) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*TableRow) Kind

func (n *TableRow) Kind() gast.NodeKind

Kind implements Node.Kind.

type TaskCheckBox

type TaskCheckBox struct {
	gast.BaseInline
	IsChecked bool
}

A TaskCheckBox struct represents a checkbox of a task list.

func NewTaskCheckBox

func NewTaskCheckBox(checked bool) *TaskCheckBox

NewTaskCheckBox returns a new TaskCheckBox node.

func (*TaskCheckBox) Dump

func (n *TaskCheckBox) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*TaskCheckBox) Kind

func (n *TaskCheckBox) Kind() gast.NodeKind

Kind implements Node.Kind.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL