errors

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package errors provides internal representation of errors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StaticError

type StaticError interface {
	// WithContext returns a new StaticError with additional context before the error message.
	WithContext(string) StaticError
	// Error returns the string representation of a StaticError.
	Error() string
	// Loc returns the place in the source code that triggerred the error.
	Loc() ast.LocationRange
}

StaticError represents an error during parsing/lexing or static analysis. TODO(sbarzowski) Make it possible to have multiple static errors and warnings

func MakeStaticError

func MakeStaticError(msg string, lr ast.LocationRange) StaticError

MakeStaticError returns a StaticError with a message and a LocationRange.

func MakeStaticErrorMsg

func MakeStaticErrorMsg(msg string) StaticError

MakeStaticErrorMsg returns a staticError with a message.

Jump to

Keyboard shortcuts

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