compiler

package
v1.10.15-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MIT Imports: 11 Imported by: 0

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