parsetree

package
v0.0.0-...-6aa2a36 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assignment

type Assignment struct {
	Symbol    lexeme.Item
	EqualSign lexeme.Item
	Value     Expression
	Semicolon lexeme.Item
}

func (Assignment) CompareStatement

func (n Assignment) CompareStatement(n2 Statement) bool

type BinaryExpression

type BinaryExpression struct {
	LeftOperand  Expression
	Operator     lexeme.Item
	RightOperand Expression
}

func (BinaryExpression) CompareExpression

func (n BinaryExpression) CompareExpression(n2 Expression) bool

type Block

type Block interface {
	CompareBlock(n2 Block) bool
}

type CodeBlock

type CodeBlock struct {
	StartFence   lexeme.Item
	StartEndline lexeme.Item
	Code         []Statement
	EndFence     lexeme.Item
	CloseEndline lexeme.Item
	EndLine      lexeme.Item
}

func (CodeBlock) CompareBlock

func (n CodeBlock) CompareBlock(n2 Block) bool

type Conditional

type Conditional struct {
	IfLiteral  lexeme.Item
	Cond       Expression
	Consequent StatementBlock
}

func (Conditional) CompareStatement

func (n Conditional) CompareStatement(n2 Statement) bool

type ConditionalWithElse

type ConditionalWithElse struct {
	IfLiteral   lexeme.Item
	Cond        Expression
	Consequent  StatementBlock
	ElseLiteral lexeme.Item
	Alternate   StatementBlock
}

func (ConditionalWithElse) CompareStatement

func (n ConditionalWithElse) CompareStatement(n2 Statement) bool

type Expression

type Expression interface {
	CompareExpression(n2 Expression) bool
}

type FrontMatter

type FrontMatter struct {
	FuncDecls []FuncDecl
	Delimiter lexeme.Item
	EndLine   lexeme.Item
}

func (FrontMatter) CompareFrontMatter

func (n FrontMatter) CompareFrontMatter(n2 FrontMatter) bool

type FuncDecl

type FuncDecl struct {
	ExternKeyword lexeme.Item
	Symbol        lexeme.Item
	OpenParen     lexeme.Item
	Params        []lexeme.Item
	CloseParen    lexeme.Item
	Semicolon     lexeme.Item
	EndLine       lexeme.Item
}

func (FuncDecl) CompareFuncDecl

func (n FuncDecl) CompareFuncDecl(n2 FuncDecl) bool

type FunctionCall

type FunctionCall struct {
	Symbol     lexeme.Item
	OpenParen  lexeme.Item
	Args       []Expression
	CloseParen lexeme.Item
	Semicolon  lexeme.Item
}

func (FunctionCall) CompareStatement

func (n FunctionCall) CompareStatement(n2 Statement) bool

type Goto

type Goto struct {
	GotoLiteral lexeme.Item
	Symbol      lexeme.Item
	Semicolon   lexeme.Item
}

func (Goto) CompareStatement

func (n Goto) CompareStatement(n2 Statement) bool
type Header struct {
	Hash    lexeme.Item
	Name    lexeme.Item
	EndLine lexeme.Item
}

func (Header) CompareHeader

func (n Header) CompareHeader(n2 Header) bool

type Inline

type Inline interface {
	CompareInline(n2 Inline) bool
}

type InlineCode

type InlineCode struct {
	CodeStart lexeme.Item
	Code      Expression
	CodeEnd   lexeme.Item
}

func (InlineCode) CompareInline

func (n InlineCode) CompareInline(n2 Inline) bool

type Line

type Line struct {
	Items   []Inline
	EndLine lexeme.Item
}

func (Line) CompareLine

func (n Line) CompareLine(n2 Line) bool
type Link struct {
	OpenBrace  lexeme.Item
	Symbol     lexeme.Item
	CloseBrace lexeme.Item
	OpenParen  lexeme.Item
	Text       Inline
	CloseParen lexeme.Item
	EndLine    lexeme.Item
}
func (n Link) CompareLink(n2 Link) bool

type LinkBlock

type LinkBlock struct {
	Link    Link
	EndLine lexeme.Item
}

func (LinkBlock) CompareBlock

func (n LinkBlock) CompareBlock(n2 Block) bool

type List

type List struct {
	Links   []ListItem
	EndLine lexeme.Item
}

func (List) CompareBlock

func (n List) CompareBlock(n2 Block) bool

type ListItem

type ListItem struct {
	Prefix lexeme.Item
	Link   Link
}

func (ListItem) CompareListItem

func (n ListItem) CompareListItem(n2 ListItem) bool

type Literal

type Literal struct {
	Value lexeme.Item
}

func (Literal) CompareExpression

func (n Literal) CompareExpression(n2 Expression) bool

type Loop

type Loop struct {
	WhileLiteral lexeme.Item
	Cond         Expression
	Body         Statement
}

func (Loop) CompareStatement

func (n Loop) CompareStatement(n2 Statement) bool

type NestedExpression

type NestedExpression struct {
	OpenParen  lexeme.Item
	Expr       Expression
	CloseParen lexeme.Item
}

func (NestedExpression) CompareExpression

func (n NestedExpression) CompareExpression(n2 Expression) bool

type Node

type Node struct {
	Header  Header
	EndLine lexeme.Item
	Blocks  []Block
}

func (Node) CompareNode

func (n Node) CompareNode(n2 Node) bool

type Paragraph

type Paragraph struct {
	Lines   []Line
	EndLine lexeme.Item
}

func (Paragraph) CompareBlock

func (n Paragraph) CompareBlock(n2 Block) bool

type Script

type Script struct {
	FrontMatter FrontMatter
	Nodes       []Node
	Eof         lexeme.Item
}

func (Script) CompareScript

func (n Script) CompareScript(n2 Script) bool

type Statement

type Statement interface {
	CompareStatement(n2 Statement) bool
}

type StatementBlock

type StatementBlock struct {
	OpenBrace  lexeme.Item
	Statements []Statement
	CloseBrace lexeme.Item
}

func (StatementBlock) CompareStatement

func (n StatementBlock) CompareStatement(n2 Statement) bool

type Text

type Text struct {
	Text lexeme.Item
}

func (Text) CompareInline

func (n Text) CompareInline(n2 Inline) bool

type UnaryExpression

type UnaryExpression struct {
	Operator lexeme.Item
	Operand  Expression
}

func (UnaryExpression) CompareExpression

func (n UnaryExpression) CompareExpression(n2 Expression) bool

Jump to

Keyboard shortcuts

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