ivy: robpike.io/ivy/parse Index | Files | Directories

package parse

import "robpike.io/ivy/parse"


Package Files

function.go help.go parse.go save.go special.go

type Assignment Uses

type Assignment struct {

Assignment is an implementation of Value that is created as the result of an assignment. It can be type-asserted to discover whether the returned value was created by assignment, such as is done in the interpreter to avoid printing the results of assignment expressions.

type Parser Uses

type Parser struct {
    // contains filtered or unexported fields

Parser stores the state for the ivy parser.

func NewParser Uses

func NewParser(fileName string, scanner *scan.Scanner, context value.Context) *Parser

NewParser returns a new parser that will read from the scanner. The context must have have been created by this package's NewContext function.

func (*Parser) Line Uses

func (p *Parser) Line() ([]value.Expr, bool)

Line reads a line of input and returns the values it evaluates. A nil returned slice means there were no values. The boolean reports whether the line is valid.


) special command '\n'
def function defintion
expressionList '\n'

func (*Parser) Loc Uses

func (p *Parser) Loc() string

Loc returns the current input location in the form "name:line: ". If the name is <stdin>, it returns the empty string.

func (*Parser) Printf Uses

func (p *Parser) Printf(format string, args ...interface{})

Printf formats the args and writes them to the configured output writer.

func (*Parser) Println Uses

func (p *Parser) Println(args ...interface{})

Println prints the args and writes them to the configured output writer.



Package parse imports 11 packages (graph) and is imported by 4 packages. Updated 2017-06-04. Refresh now. Tools for package owners.