parsery

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	TokType Token
	Value   string
}

type Parser

type Parser struct {
	Nodes []Node
}

func NewParser

func NewParser(nodes []Node) *Parser

type Parsery

type Parsery struct {
	File    string
	Content []rune
}

func New

func New(file string) *Parsery

func (*Parsery) PrintContent

func (p *Parsery) PrintContent()

func (*Parsery) Run

func (p *Parsery) Run()

type Token

type Token int
const (
	ADD Token = iota
	NUMBER
)

type Tokenizer

type Tokenizer struct {
	Content []rune
	Index   int
	Max     int
	Nodes   []Node
}

func NewTokenizer

func NewTokenizer(content []rune) *Tokenizer

func (*Tokenizer) GetTokens

func (t *Tokenizer) GetTokens() []Node

Jump to

Keyboard shortcuts

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