syntax

package
v0.0.0-...-99d40e0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EOF token = iota + 1
	Ident

	// Literals
	Int
	Float
	Rune
	String
	Comment

	Semi
	Colon
)
View Source
const PosMax = 1 << 30

PosMax is the largest line or column value that can be represented without loss. Incoming values (arguments) larger than PosMax will be set to PosMax.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pos

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

A Pos represents an absolute (line, col) source position with. Pos values are intentionally light-weight so that they can be created without too much concern about space use.

func MakePos

func MakePos(filename string, line, col uint) Pos

MakePos returns a new Pos for the given FileBase, line and column.

func (Pos) Col

func (pos Pos) Col() uint

func (Pos) Filename

func (pos Pos) Filename() string

func (Pos) IsKnown

func (pos Pos) IsKnown() bool

func (Pos) Line

func (pos Pos) Line() uint

func (Pos) String

func (pos Pos) String() string

Jump to

Keyboard shortcuts

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