parser

package
v0.0.0-...-9360a54 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2018 License: MIT Imports: 5 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 interface {
	// contains filtered or unexported methods
}

Node contains basic information about a language construct

type Parser

type Parser struct {
	Ast []Node
	// contains filtered or unexported fields
}

Parser allows for easy interfacing with tokens to create nodes from them

func NewParser

func NewParser(tokens []*tokens.Token) *Parser

NewParser creates a new instance of a Parser This function prevents cyclic imports to parser.go

func (*Parser) Parse

func (p *Parser) Parse()

Parse takes a set of tokens from the lexer and turns them into statements

func (*Parser) Peek

func (p *Parser) Peek() *tokens.Token

Peek returns the next token without consuming it

Jump to

Keyboard shortcuts

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