types

package
v0.0.0-...-5c64afc Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Any

type Any struct{}

func (*Any) String

func (b *Any) String() string

type Boolean

type Boolean struct{}

func (*Boolean) String

func (b *Boolean) String() string

type Environment

type Environment struct {
	Files    map[protocol.URI]*ast.File
	RootPath string

	Types map[string]Type
	// contains filtered or unexported fields
}

func NewEnvironment

func NewEnvironment() *Environment

func (*Environment) AddFile

func (e *Environment) AddFile(uri protocol.URI) *ast.File

func (*Environment) AddTransientFile

func (e *Environment) AddTransientFile(uri protocol.URI, content string) *ast.File

func (*Environment) CheckFilePhase1

func (e *Environment) CheckFilePhase1(file *ast.File)

func (*Environment) CheckPhase1

func (e *Environment) CheckPhase1()

CheckPhase1 executes the first phase of type checking. The first phase gathers a list of which types exist in the environment, but does not delve into details.

func (*Environment) Init

func (e *Environment) Init()

Init parses all Lua files in the root directory and builds the type graph.

type Function

type Function struct {
	Params []NameAndType
	Return Type
}

func (*Function) String

func (f *Function) String() string

type NameAndType

type NameAndType struct {
	Name string
	Def  ast.Node
	Type Type
}

func (*NameAndType) String

func (n *NameAndType) String() string

type Named

type Named struct {
	Name  string
	Range token.Range
}

Named represents a named type, constructed with `@class`.

func (*Named) String

func (n *Named) String() string

type Number

type Number struct{}

func (*Number) String

func (n *Number) String() string

type String

type String struct{}

func (*String) String

func (s *String) String() string

type Table

type Table struct {
	Fields []NameAndType
}

func (*Table) String

func (t *Table) String() string

type Type

type Type interface {
	String() string
	// contains filtered or unexported methods
}

type Unknown

type Unknown struct{}

func (*Unknown) String

func (u *Unknown) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳