compiler

package
v1.10.4-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const InternalErrorMsg = "internal compiler error, please report to the issue tracker"

Variables

This section is empty.

Functions

func Compile

func Compile(input string) (*program.Program, error)

Types

type CompileArtifacts

type CompileArtifacts struct {
	Source  string
	Tokens  []antlr.Token
	Errors  []CompileError
	Program *program.Program
}

func CompileFull

func CompileFull(input string) CompileArtifacts

type CompileError

type CompileError struct {
	StartL, StartC int
	EndL, EndC     int
	Msg            string
}

func InternalError

func InternalError(c antlr.ParserRuleContext) *CompileError

func LogicError

func LogicError(c antlr.ParserRuleContext, err error) *CompileError

type CompileErrorList

type CompileErrorList struct {
	Errors []CompileError
	Source string
}

func (*CompileErrorList) Error

func (c *CompileErrorList) Error() string

type ErrorListener

type ErrorListener struct {
	*antlr.DefaultErrorListener
	Errors []CompileError
}

func (*ErrorListener) SyntaxError

func (l *ErrorListener) SyntaxError(recognizer antlr.Recognizer, offendingSymbol interface{}, startL, startC int, msg string, e antlr.RecognitionException)

type FallbackAccount

type FallbackAccount core.Address

Jump to

Keyboard shortcuts

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