parser

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package parser translates the linear stream of tokens into ast structures based on the syntax of the ok language.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Funcs    map[string]*ast.Func
	Tests    []*ast.Test
	Imports  map[string]string
	Comments []*ast.Comment
	Tokens   []lexer.Token
}

File contains the output state of the parser for a single input.

type Parser

type Parser struct {
	Errors []error
	File   *File
}

func ParseString

func ParseString(s string) *Parser

ParseString parses source code and returns the AST for the file.

Jump to

Keyboard shortcuts

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