checker

package
v0.0.0-...-97dcd37 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package checker defines functions to type-checked a parsed expression against a set of identifier and function declarations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(parsedExpr *expr.ParsedExpr, env *Env) *checked.CheckedExpr

func FormatCheckedType

func FormatCheckedType(t *checked.Type) string

FormatCheckedType converts a type message into a string representation.

func StandardDeclarations

func StandardDeclarations() []*checked.Decl

Types

type Env

type Env struct {
	// contains filtered or unexported fields
}

func NewEnv

func NewEnv(packager packages.Packager,
	typeProvider ref.TypeProvider,
	errors *common.Errors) *Env

func NewStandardEnv

func NewStandardEnv(packager packages.Packager,
	typeProvider ref.TypeProvider,
	errors *common.Errors) *Env

func (*Env) Add

func (e *Env) Add(decls ...*checked.Decl)

func (*Env) LookupFunction

func (e *Env) LookupFunction(typeName string) *checked.Decl

func (*Env) LookupIdent

func (e *Env) LookupIdent(typeName string) *checked.Decl

Directories

Path Synopsis
Package decls provides helpers for creating variable and function declarations.
Package decls provides helpers for creating variable and function declarations.

Jump to

Keyboard shortcuts

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