deployr: github.com/skx/deployr/parser Index | Files

package parser

import "github.com/skx/deployr/parser"

Index

Package Files

parser.go

type Parser Uses

type Parser struct {
    // Our tokenizer.
    Tokenizer tokenizer
}

Parser holds our internal state.

func New Uses

func New(tk tokenizer) *Parser

New returns a new Parser object, consuming tokens from the specified tokenizer-interface.

func (*Parser) GetArguments Uses

func (p *Parser) GetArguments(expected []token.Token) ([]token.Token, error)

GetArguments fetches arguments from the lexer, ensuring they're the expected types.

func (*Parser) Parse Uses

func (p *Parser) Parse() ([]statement.Statement, error)

Parse the given program, catching errors.

Package parser imports 3 packages (graph) and is imported by 1 packages. Updated 2019-09-14. Refresh now. Tools for package owners.