tok

package
v0.0.0-...-bccf2d6 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package tok implements Functional Bus Description Language tokens.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Loc

func Loc(t Token) string

Loc returns location of the token within the file in "line:column" format.

func Text

func Text(t Token, src []byte) string

Text returns token text from the source.

Types

type Access

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

Property tokens

func (Access) Column

func (pos Access) Column() int

func (Access) End

func (pos Access) End() int

func (Access) Line

func (pos Access) Line() int

func (Access) Name

func (a Access) Name() string

func (Access) Path

func (pos Access) Path() string

func (Access) Src

func (pos Access) Src() []byte

func (Access) Start

func (pos Access) Start() int

type Add

type Add struct {
	// contains filtered or unexported fields

} // +

func (Add) Column

func (pos Add) Column() int

func (Add) End

func (pos Add) End() int

func (Add) Line

func (pos Add) Line() int

func (Add) Name

func (a Add) Name() string

func (Add) Path

func (pos Add) Path() string

func (Add) Precedence

func (a Add) Precedence() int

func (Add) Src

func (pos Add) Src() []byte

func (Add) Start

func (pos Add) Start() int

type AddEnable

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

func (AddEnable) Column

func (pos AddEnable) Column() int

func (AddEnable) End

func (pos AddEnable) End() int

func (AddEnable) Line

func (pos AddEnable) Line() int

func (AddEnable) Name

func (ae AddEnable) Name() string

func (AddEnable) Path

func (pos AddEnable) Path() string

func (AddEnable) Src

func (pos AddEnable) Src() []byte

func (AddEnable) Start

func (pos AddEnable) Start() int

type And

type And struct {
	// contains filtered or unexported fields

} // &&

func (And) Column

func (pos And) Column() int

func (And) End

func (pos And) End() int

func (And) Line

func (pos And) Line() int

func (And) Name

func (a And) Name() string

func (And) Path

func (pos And) Path() string

func (And) Precedence

func (a And) Precedence() int

func (And) Src

func (pos And) Src() []byte

func (And) Start

func (pos And) Start() int

type Ass

type Ass struct {
	// contains filtered or unexported fields

} // =

func (Ass) Column

func (pos Ass) Column() int

func (Ass) End

func (pos Ass) End() int

func (Ass) Line

func (pos Ass) Line() int

func (Ass) Name

func (a Ass) Name() string

func (Ass) Path

func (pos Ass) Path() string

func (Ass) Src

func (pos Ass) Src() []byte

func (Ass) Start

func (pos Ass) Start() int

type Atomic

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

func (Atomic) Column

func (pos Atomic) Column() int

func (Atomic) End

func (pos Atomic) End() int

func (Atomic) Line

func (pos Atomic) Line() int

func (Atomic) Name

func (a Atomic) Name() string

func (Atomic) Path

func (pos Atomic) Path() string

func (Atomic) Src

func (pos Atomic) Src() []byte

func (Atomic) Start

func (pos Atomic) Start() int

type BitAnd

type BitAnd struct {
	// contains filtered or unexported fields

} // &

func (BitAnd) Column

func (pos BitAnd) Column() int

func (BitAnd) End

func (pos BitAnd) End() int

func (BitAnd) Line

func (pos BitAnd) Line() int

func (BitAnd) Name

func (ba BitAnd) Name() string

func (BitAnd) Path

func (pos BitAnd) Path() string

func (BitAnd) Precedence

func (ba BitAnd) Precedence() int

func (BitAnd) Src

func (pos BitAnd) Src() []byte

func (BitAnd) Start

func (pos BitAnd) Start() int

type BitOr

type BitOr struct {
	// contains filtered or unexported fields

} // |

func (BitOr) Column

func (pos BitOr) Column() int

func (BitOr) End

func (pos BitOr) End() int

func (BitOr) Line

func (pos BitOr) Line() int

func (BitOr) Name

func (bo BitOr) Name() string

func (BitOr) Path

func (pos BitOr) Path() string

func (BitOr) Precedence

func (bo BitOr) Precedence() int

func (BitOr) Src

func (pos BitOr) Src() []byte

func (BitOr) Start

func (pos BitOr) Start() int

type BitString

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

func (BitString) Column

func (pos BitString) Column() int

func (BitString) End

func (pos BitString) End() int

func (BitString) Line

func (pos BitString) Line() int

func (BitString) Name

func (bs BitString) Name() string

func (BitString) Path

func (pos BitString) Path() string

func (BitString) Src

func (pos BitString) Src() []byte

func (BitString) Start

func (pos BitString) Start() int

type Block

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

Functionality tokens

func (Block) Column

func (pos Block) Column() int

func (Block) End

func (pos Block) End() int

func (Block) Line

func (pos Block) Line() int

func (Block) Name

func (b Block) Name() string

func (Block) Path

func (pos Block) Path() string

func (Block) Src

func (pos Block) Src() []byte

func (Block) Start

func (pos Block) Start() int

type Bool

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

func (Bool) Column

func (pos Bool) Column() int

func (Bool) End

func (pos Bool) End() int

func (Bool) Line

func (pos Bool) Line() int

func (Bool) Name

func (b Bool) Name() string

func (Bool) Path

func (pos Bool) Path() string

func (Bool) Src

func (pos Bool) Src() []byte

func (Bool) Start

func (pos Bool) Start() int

type Bus

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

func (Bus) Column

func (pos Bus) Column() int

func (Bus) End

func (pos Bus) End() int

func (Bus) Line

func (pos Bus) Line() int

func (Bus) Name

func (b Bus) Name() string

func (Bus) Path

func (pos Bus) Path() string

func (Bus) Src

func (pos Bus) Src() []byte

func (Bus) Start

func (pos Bus) Start() int

type ByteWriteEnable

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

func (ByteWriteEnable) Column

func (pos ByteWriteEnable) Column() int

func (ByteWriteEnable) End

func (pos ByteWriteEnable) End() int

func (ByteWriteEnable) Line

func (pos ByteWriteEnable) Line() int

func (ByteWriteEnable) Name

func (bwe ByteWriteEnable) Name() string

func (ByteWriteEnable) Path

func (pos ByteWriteEnable) Path() string

func (ByteWriteEnable) Src

func (pos ByteWriteEnable) Src() []byte

func (ByteWriteEnable) Start

func (pos ByteWriteEnable) Start() int

type Clear

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

func (Clear) Column

func (pos Clear) Column() int

func (Clear) End

func (pos Clear) End() int

func (Clear) Line

func (pos Clear) Line() int

func (Clear) Name

func (c Clear) Name() string

func (Clear) Path

func (pos Clear) Path() string

func (Clear) Src

func (pos Clear) Src() []byte

func (Clear) Start

func (pos Clear) Start() int

type Colon

type Colon struct {
	// contains filtered or unexported fields

} // :

func (Colon) Column

func (pos Colon) Column() int

func (Colon) End

func (pos Colon) End() int

func (Colon) Line

func (pos Colon) Line() int

func (Colon) Name

func (c Colon) Name() string

func (Colon) Path

func (pos Colon) Path() string

func (Colon) Precedence

func (c Colon) Precedence() int

func (Colon) Src

func (pos Colon) Src() []byte

func (Colon) Start

func (pos Colon) Start() int

type Comma

type Comma struct {
	// contains filtered or unexported fields

} // ,

func (Comma) Column

func (pos Comma) Column() int

func (Comma) End

func (pos Comma) End() int

func (Comma) Line

func (pos Comma) Line() int

func (Comma) Name

func (c Comma) Name() string

func (Comma) Path

func (pos Comma) Path() string

func (Comma) Src

func (pos Comma) Src() []byte

func (Comma) Start

func (pos Comma) Start() int

type Comment

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

func (Comment) Column

func (pos Comment) Column() int

func (Comment) End

func (pos Comment) End() int

func (Comment) Line

func (pos Comment) Line() int

func (Comment) Name

func (c Comment) Name() string

func (Comment) Path

func (pos Comment) Path() string

func (Comment) Src

func (pos Comment) Src() []byte

func (Comment) Start

func (pos Comment) Start() int

type Config

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

func (Config) Column

func (pos Config) Column() int

func (Config) End

func (pos Config) End() int

func (Config) Line

func (pos Config) Line() int

func (Config) Name

func (c Config) Name() string

func (Config) Path

func (pos Config) Path() string

func (Config) Src

func (pos Config) Src() []byte

func (Config) Start

func (pos Config) Start() int

type Const

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

Keyword tokens

func (Const) Column

func (pos Const) Column() int

func (Const) End

func (pos Const) End() int

func (Const) Line

func (pos Const) Line() int

func (Const) Name

func (c Const) Name() string

func (Const) Path

func (pos Const) Path() string

func (Const) Src

func (pos Const) Src() []byte

func (Const) Start

func (pos Const) Start() int

type Dedent

type Dedent struct {
	// contains filtered or unexported fields

} // Indent decrement

func (Dedent) Column

func (pos Dedent) Column() int

func (Dedent) End

func (pos Dedent) End() int

func (Dedent) Line

func (pos Dedent) Line() int

func (Dedent) Name

func (d Dedent) Name() string

func (Dedent) Path

func (pos Dedent) Path() string

func (Dedent) Src

func (pos Dedent) Src() []byte

func (Dedent) Start

func (pos Dedent) Start() int

type Delay

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

func (Delay) Column

func (pos Delay) Column() int

func (Delay) End

func (pos Delay) End() int

func (Delay) Line

func (pos Delay) Line() int

func (Delay) Name

func (d Delay) Name() string

func (Delay) Path

func (pos Delay) Path() string

func (Delay) Src

func (pos Delay) Src() []byte

func (Delay) Start

func (pos Delay) Start() int

type Div

type Div struct {
	// contains filtered or unexported fields

} // /

func (Div) Column

func (pos Div) Column() int

func (Div) End

func (pos Div) End() int

func (Div) Line

func (pos Div) Line() int

func (Div) Name

func (d Div) Name() string

func (Div) Path

func (pos Div) Path() string

func (Div) Precedence

func (d Div) Precedence() int

func (Div) Src

func (pos Div) Src() []byte

func (Div) Start

func (pos Div) Start() int

type EnableInitValue

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

func (EnableInitValue) Column

func (pos EnableInitValue) Column() int

func (EnableInitValue) End

func (pos EnableInitValue) End() int

func (EnableInitValue) Line

func (pos EnableInitValue) Line() int

func (EnableInitValue) Name

func (eiv EnableInitValue) Name() string

func (EnableInitValue) Path

func (pos EnableInitValue) Path() string

func (EnableInitValue) Src

func (pos EnableInitValue) Src() []byte

func (EnableInitValue) Start

func (pos EnableInitValue) Start() int

type EnableResetValue

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

func (EnableResetValue) Column

func (pos EnableResetValue) Column() int

func (EnableResetValue) End

func (pos EnableResetValue) End() int

func (EnableResetValue) Line

func (pos EnableResetValue) Line() int

func (EnableResetValue) Name

func (erv EnableResetValue) Name() string

func (EnableResetValue) Path

func (pos EnableResetValue) Path() string

func (EnableResetValue) Src

func (pos EnableResetValue) Src() []byte

func (EnableResetValue) Start

func (pos EnableResetValue) Start() int

type Eof

type Eof struct {
	// contains filtered or unexported fields

} // End of file

func (Eof) Column

func (pos Eof) Column() int

func (Eof) End

func (pos Eof) End() int

func (Eof) Line

func (pos Eof) Line() int

func (Eof) Name

func (e Eof) Name() string

func (Eof) Path

func (pos Eof) Path() string

func (Eof) Src

func (pos Eof) Src() []byte

func (Eof) Start

func (pos Eof) Start() int

type Eq

type Eq struct {
	// contains filtered or unexported fields

} // ==

func (Eq) Column

func (pos Eq) Column() int

func (Eq) End

func (pos Eq) End() int

func (Eq) Line

func (pos Eq) Line() int

func (Eq) Name

func (e Eq) Name() string

func (Eq) Path

func (pos Eq) Path() string

func (Eq) Precedence

func (e Eq) Precedence() int

func (Eq) Src

func (pos Eq) Src() []byte

func (Eq) Start

func (pos Eq) Start() int

type Error

type Error struct {
	Msg  string
	Toks []Token
}

func (Error) Error

func (err Error) Error() string

type Exp

type Exp struct {
	// contains filtered or unexported fields

} // **

func (Exp) Column

func (pos Exp) Column() int

func (Exp) End

func (pos Exp) End() int

func (Exp) Line

func (pos Exp) Line() int

func (Exp) Name

func (e Exp) Name() string

func (Exp) Path

func (pos Exp) Path() string

func (Exp) Precedence

func (e Exp) Precedence() int

func (Exp) Src

func (pos Exp) Src() []byte

func (Exp) Start

func (pos Exp) Start() int

type Float

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

func (Float) Column

func (pos Float) Column() int

func (Float) End

func (pos Float) End() int

func (Float) Line

func (pos Float) Line() int

func (Float) Name

func (f Float) Name() string

func (Float) Path

func (pos Float) Path() string

func (Float) Src

func (pos Float) Src() []byte

func (Float) Start

func (pos Float) Start() int

type Functionality

type Functionality interface {
	Token
	// contains filtered or unexported methods
}

Various token types

type Greater

type Greater struct {
	// contains filtered or unexported fields

} // >

func (Greater) Column

func (pos Greater) Column() int

func (Greater) End

func (pos Greater) End() int

func (Greater) Line

func (pos Greater) Line() int

func (Greater) Name

func (g Greater) Name() string

func (Greater) Path

func (pos Greater) Path() string

func (Greater) Precedence

func (g Greater) Precedence() int

func (Greater) Src

func (pos Greater) Src() []byte

func (Greater) Start

func (pos Greater) Start() int

type GreaterEq

type GreaterEq struct {
	// contains filtered or unexported fields

} // >=

func (GreaterEq) Column

func (pos GreaterEq) Column() int

func (GreaterEq) End

func (pos GreaterEq) End() int

func (GreaterEq) Line

func (pos GreaterEq) Line() int

func (GreaterEq) Name

func (ge GreaterEq) Name() string

func (GreaterEq) Path

func (pos GreaterEq) Path() string

func (GreaterEq) Precedence

func (ge GreaterEq) Precedence() int

func (GreaterEq) Src

func (pos GreaterEq) Src() []byte

func (GreaterEq) Start

func (pos GreaterEq) Start() int

type Groups

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

func (Groups) Column

func (pos Groups) Column() int

func (Groups) End

func (pos Groups) End() int

func (Groups) Line

func (pos Groups) Line() int

func (Groups) Name

func (g Groups) Name() string

func (Groups) Path

func (pos Groups) Path() string

func (Groups) Src

func (pos Groups) Src() []byte

func (Groups) Start

func (pos Groups) Start() int

type Ident

type Ident struct {
	// contains filtered or unexported fields

} // Identifier

func (Ident) Column

func (pos Ident) Column() int

func (Ident) End

func (pos Ident) End() int

func (Ident) Line

func (pos Ident) Line() int

func (Ident) Name

func (i Ident) Name() string

func (Ident) Path

func (pos Ident) Path() string

func (Ident) Src

func (pos Ident) Src() []byte

func (Ident) Start

func (pos Ident) Start() int

type Import

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

func (Import) Column

func (pos Import) Column() int

func (Import) End

func (pos Import) End() int

func (Import) Line

func (pos Import) Line() int

func (Import) Name

func (i Import) Name() string

func (Import) Path

func (pos Import) Path() string

func (Import) Src

func (pos Import) Src() []byte

func (Import) Start

func (pos Import) Start() int

type InTrigger

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

func (InTrigger) Column

func (pos InTrigger) Column() int

func (InTrigger) End

func (pos InTrigger) End() int

func (InTrigger) Line

func (pos InTrigger) Line() int

func (InTrigger) Name

func (it InTrigger) Name() string

func (InTrigger) Path

func (pos InTrigger) Path() string

func (InTrigger) Src

func (pos InTrigger) Src() []byte

func (InTrigger) Start

func (pos InTrigger) Start() int

type Indent

type Indent struct {
	// contains filtered or unexported fields

} // Indent increment

func (Indent) Column

func (pos Indent) Column() int

func (Indent) End

func (pos Indent) End() int

func (Indent) Line

func (pos Indent) Line() int

func (Indent) Name

func (i Indent) Name() string

func (Indent) Path

func (pos Indent) Path() string

func (Indent) Src

func (pos Indent) Src() []byte

func (Indent) Start

func (pos Indent) Start() int

type InitValue

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

func (InitValue) Column

func (pos InitValue) Column() int

func (InitValue) End

func (pos InitValue) End() int

func (InitValue) Line

func (pos InitValue) Line() int

func (InitValue) Name

func (iv InitValue) Name() string

func (InitValue) Path

func (pos InitValue) Path() string

func (InitValue) Src

func (pos InitValue) Src() []byte

func (InitValue) Start

func (pos InitValue) Start() int

type Int

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

func (Int) Column

func (pos Int) Column() int

func (Int) End

func (pos Int) End() int

func (Int) Line

func (pos Int) Line() int

func (Int) Name

func (i Int) Name() string

func (Int) Path

func (pos Int) Path() string

func (Int) Src

func (pos Int) Src() []byte

func (Int) Start

func (pos Int) Start() int

type Irq

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

func (Irq) Column

func (pos Irq) Column() int

func (Irq) End

func (pos Irq) End() int

func (Irq) Line

func (pos Irq) Line() int

func (Irq) Name

func (i Irq) Name() string

func (Irq) Path

func (pos Irq) Path() string

func (Irq) Src

func (pos Irq) Src() []byte

func (Irq) Start

func (pos Irq) Start() int

type LBrace

type LBrace struct {
	// contains filtered or unexported fields

} // {

func (LBrace) Column

func (pos LBrace) Column() int

func (LBrace) End

func (pos LBrace) End() int

func (LBrace) Line

func (pos LBrace) Line() int

func (LBrace) Name

func (lb LBrace) Name() string

func (LBrace) Path

func (pos LBrace) Path() string

func (LBrace) Src

func (pos LBrace) Src() []byte

func (LBrace) Start

func (pos LBrace) Start() int

type LBracket

type LBracket struct {
	// contains filtered or unexported fields

} // [

func (LBracket) Column

func (pos LBracket) Column() int

func (LBracket) End

func (pos LBracket) End() int

func (LBracket) Line

func (pos LBracket) Line() int

func (LBracket) Name

func (lb LBracket) Name() string

func (LBracket) Path

func (pos LBracket) Path() string

func (LBracket) Src

func (pos LBracket) Src() []byte

func (LBracket) Start

func (pos LBracket) Start() int

type LParen

type LParen struct {
	// contains filtered or unexported fields

} // (

func (LParen) Column

func (pos LParen) Column() int

func (LParen) End

func (pos LParen) End() int

func (LParen) Line

func (pos LParen) Line() int

func (LParen) Name

func (lp LParen) Name() string

func (LParen) Path

func (pos LParen) Path() string

func (LParen) Src

func (pos LParen) Src() []byte

func (LParen) Start

func (pos LParen) Start() int

type LShift

type LShift struct {
	// contains filtered or unexported fields

} // <<

func (LShift) Column

func (pos LShift) Column() int

func (LShift) End

func (pos LShift) End() int

func (LShift) Line

func (pos LShift) Line() int

func (LShift) Name

func (ls LShift) Name() string

func (LShift) Path

func (pos LShift) Path() string

func (LShift) Precedence

func (ls LShift) Precedence() int

func (LShift) Src

func (pos LShift) Src() []byte

func (LShift) Start

func (pos LShift) Start() int

type Less

type Less struct {
	// contains filtered or unexported fields

} // <

func (Less) Column

func (pos Less) Column() int

func (Less) End

func (pos Less) End() int

func (Less) Line

func (pos Less) Line() int

func (Less) Name

func (l Less) Name() string

func (Less) Path

func (pos Less) Path() string

func (Less) Precedence

func (l Less) Precedence() int

func (Less) Src

func (pos Less) Src() []byte

func (Less) Start

func (pos Less) Start() int

type LessEq

type LessEq struct {
	// contains filtered or unexported fields

} // <=

func (LessEq) Column

func (pos LessEq) Column() int

func (LessEq) End

func (pos LessEq) End() int

func (LessEq) Line

func (pos LessEq) Line() int

func (LessEq) Name

func (le LessEq) Name() string

func (LessEq) Path

func (pos LessEq) Path() string

func (LessEq) Precedence

func (le LessEq) Precedence() int

func (LessEq) Src

func (pos LessEq) Src() []byte

func (LessEq) Start

func (pos LessEq) Start() int

type Mask

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

func (Mask) Column

func (pos Mask) Column() int

func (Mask) End

func (pos Mask) End() int

func (Mask) Line

func (pos Mask) Line() int

func (Mask) Name

func (m Mask) Name() string

func (Mask) Path

func (pos Mask) Path() string

func (Mask) Src

func (pos Mask) Src() []byte

func (Mask) Start

func (pos Mask) Start() int

type Masters

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

func (Masters) Column

func (pos Masters) Column() int

func (Masters) End

func (pos Masters) End() int

func (Masters) Line

func (pos Masters) Line() int

func (Masters) Name

func (m Masters) Name() string

func (Masters) Path

func (pos Masters) Path() string

func (Masters) Src

func (pos Masters) Src() []byte

func (Masters) Start

func (pos Masters) Start() int

type Memory

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

func (Memory) Column

func (pos Memory) Column() int

func (Memory) End

func (pos Memory) End() int

func (Memory) Line

func (pos Memory) Line() int

func (Memory) Name

func (m Memory) Name() string

func (Memory) Path

func (pos Memory) Path() string

func (Memory) Src

func (pos Memory) Src() []byte

func (Memory) Start

func (pos Memory) Start() int

type Mul

type Mul struct {
	// contains filtered or unexported fields

} // *

func (Mul) Column

func (pos Mul) Column() int

func (Mul) End

func (pos Mul) End() int

func (Mul) Line

func (pos Mul) Line() int

func (Mul) Name

func (m Mul) Name() string

func (Mul) Path

func (pos Mul) Path() string

func (Mul) Precedence

func (m Mul) Precedence() int

func (Mul) Src

func (pos Mul) Src() []byte

func (Mul) Start

func (pos Mul) Start() int

type Neg

type Neg struct {
	// contains filtered or unexported fields

} // !

func (Neg) Column

func (pos Neg) Column() int

func (Neg) End

func (pos Neg) End() int

func (Neg) Line

func (pos Neg) Line() int

func (Neg) Name

func (n Neg) Name() string

func (Neg) Path

func (pos Neg) Path() string

func (Neg) Src

func (pos Neg) Src() []byte

func (Neg) Start

func (pos Neg) Start() int

type Neq

type Neq struct {
	// contains filtered or unexported fields

} // !=

func (Neq) Column

func (pos Neq) Column() int

func (Neq) End

func (pos Neq) End() int

func (Neq) Line

func (pos Neq) Line() int

func (Neq) Name

func (n Neq) Name() string

func (Neq) Path

func (pos Neq) Path() string

func (Neq) Precedence

func (n Neq) Precedence() int

func (Neq) Src

func (pos Neq) Src() []byte

func (Neq) Start

func (pos Neq) Start() int

type Newline

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

func (Newline) Column

func (pos Newline) Column() int

func (Newline) End

func (pos Newline) End() int

func (Newline) Line

func (pos Newline) Line() int

func (Newline) Name

func (n Newline) Name() string

func (Newline) Path

func (pos Newline) Path() string

func (Newline) Src

func (pos Newline) Src() []byte

func (Newline) Start

func (pos Newline) Start() int

type None

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

func (None) Column

func (pos None) Column() int

func (None) End

func (pos None) End() int

func (None) Line

func (pos None) Line() int

func (None) Name

func (n None) Name() string

func (None) Path

func (pos None) Path() string

func (None) Src

func (pos None) Src() []byte

func (None) Start

func (pos None) Start() int

type Number

type Number interface {
	Token
	// contains filtered or unexported methods
}

Various token types

type Operator

type Operator interface {
	Token
	Precedence() int
}

Various token types

type Or

type Or struct {
	// contains filtered or unexported fields

} // ||

func (Or) Column

func (pos Or) Column() int

func (Or) End

func (pos Or) End() int

func (Or) Line

func (pos Or) Line() int

func (Or) Name

func (o Or) Name() string

func (Or) Path

func (pos Or) Path() string

func (Or) Precedence

func (o Or) Precedence() int

func (Or) Src

func (pos Or) Src() []byte

func (Or) Start

func (pos Or) Start() int

type OutTrigger

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

func (OutTrigger) Column

func (pos OutTrigger) Column() int

func (OutTrigger) End

func (pos OutTrigger) End() int

func (OutTrigger) Line

func (pos OutTrigger) Line() int

func (OutTrigger) Name

func (ot OutTrigger) Name() string

func (OutTrigger) Path

func (pos OutTrigger) Path() string

func (OutTrigger) Src

func (pos OutTrigger) Src() []byte

func (OutTrigger) Start

func (pos OutTrigger) Start() int

type Param

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

func (Param) Column

func (pos Param) Column() int

func (Param) End

func (pos Param) End() int

func (Param) Line

func (pos Param) Line() int

func (Param) Name

func (p Param) Name() string

func (Param) Path

func (pos Param) Path() string

func (Param) Src

func (pos Param) Src() []byte

func (Param) Start

func (pos Param) Start() int

type Period

type Period struct {
	// contains filtered or unexported fields

} // .

Currently unused tokens

func (Period) Column

func (pos Period) Column() int

func (Period) End

func (pos Period) End() int

func (Period) Line

func (pos Period) Line() int

func (Period) Name

func (p Period) Name() string

func (Period) Path

func (pos Period) Path() string

func (Period) Src

func (pos Period) Src() []byte

func (Period) Start

func (pos Period) Start() int

type Proc

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

func (Proc) Column

func (pos Proc) Column() int

func (Proc) End

func (pos Proc) End() int

func (Proc) Line

func (pos Proc) Line() int

func (Proc) Name

func (p Proc) Name() string

func (Proc) Path

func (pos Proc) Path() string

func (Proc) Src

func (pos Proc) Src() []byte

func (Proc) Start

func (pos Proc) Start() int

type Property

type Property interface {
	Token
	// contains filtered or unexported methods
}

Various token types

type QualIdent

type QualIdent struct {
	// contains filtered or unexported fields

} // Qualified Identifier

func (QualIdent) Column

func (pos QualIdent) Column() int

func (QualIdent) End

func (pos QualIdent) End() int

func (QualIdent) Line

func (pos QualIdent) Line() int

func (QualIdent) Name

func (qi QualIdent) Name() string

func (QualIdent) Path

func (pos QualIdent) Path() string

func (QualIdent) Src

func (pos QualIdent) Src() []byte

func (QualIdent) Start

func (pos QualIdent) Start() int

type RBrace

type RBrace struct {
	// contains filtered or unexported fields

} // }

func (RBrace) Column

func (pos RBrace) Column() int

func (RBrace) End

func (pos RBrace) End() int

func (RBrace) Line

func (pos RBrace) Line() int

func (RBrace) Name

func (rb RBrace) Name() string

func (RBrace) Path

func (pos RBrace) Path() string

func (RBrace) Src

func (pos RBrace) Src() []byte

func (RBrace) Start

func (pos RBrace) Start() int

type RBracket

type RBracket struct {
	// contains filtered or unexported fields

} // ]

func (RBracket) Column

func (pos RBracket) Column() int

func (RBracket) End

func (pos RBracket) End() int

func (RBracket) Line

func (pos RBracket) Line() int

func (RBracket) Name

func (rb RBracket) Name() string

func (RBracket) Path

func (pos RBracket) Path() string

func (RBracket) Src

func (pos RBracket) Src() []byte

func (RBracket) Start

func (pos RBracket) Start() int

type RParen

type RParen struct {
	// contains filtered or unexported fields

} // )

func (RParen) Column

func (pos RParen) Column() int

func (RParen) End

func (pos RParen) End() int

func (RParen) Line

func (pos RParen) Line() int

func (RParen) Name

func (lp RParen) Name() string

func (RParen) Path

func (pos RParen) Path() string

func (RParen) Src

func (pos RParen) Src() []byte

func (RParen) Start

func (pos RParen) Start() int

type RShift

type RShift struct {
	// contains filtered or unexported fields

} // >>

func (RShift) Column

func (pos RShift) Column() int

func (RShift) End

func (pos RShift) End() int

func (RShift) Line

func (pos RShift) Line() int

func (RShift) Name

func (ls RShift) Name() string

func (RShift) Path

func (pos RShift) Path() string

func (RShift) Precedence

func (ls RShift) Precedence() int

func (RShift) Src

func (pos RShift) Src() []byte

func (RShift) Start

func (pos RShift) Start() int

type Range

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

func (Range) Column

func (pos Range) Column() int

func (Range) End

func (pos Range) End() int

func (Range) Line

func (pos Range) Line() int

func (Range) Name

func (r Range) Name() string

func (Range) Path

func (pos Range) Path() string

func (Range) Src

func (pos Range) Src() []byte

func (Range) Start

func (pos Range) Start() int

type ReadLatency

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

func (ReadLatency) Column

func (pos ReadLatency) Column() int

func (ReadLatency) End

func (pos ReadLatency) End() int

func (ReadLatency) Line

func (pos ReadLatency) Line() int

func (ReadLatency) Name

func (rl ReadLatency) Name() string

func (ReadLatency) Path

func (pos ReadLatency) Path() string

func (ReadLatency) Src

func (pos ReadLatency) Src() []byte

func (ReadLatency) Start

func (pos ReadLatency) Start() int

type ReadValue

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

func (ReadValue) Column

func (pos ReadValue) Column() int

func (ReadValue) End

func (pos ReadValue) End() int

func (ReadValue) Line

func (pos ReadValue) Line() int

func (ReadValue) Name

func (rv ReadValue) Name() string

func (ReadValue) Path

func (pos ReadValue) Path() string

func (ReadValue) Src

func (pos ReadValue) Src() []byte

func (ReadValue) Start

func (pos ReadValue) Start() int

type Rem

type Rem struct {
	// contains filtered or unexported fields

} // %

func (Rem) Column

func (pos Rem) Column() int

func (Rem) End

func (pos Rem) End() int

func (Rem) Line

func (pos Rem) Line() int

func (Rem) Name

func (r Rem) Name() string

func (Rem) Path

func (pos Rem) Path() string

func (Rem) Precedence

func (r Rem) Precedence() int

func (Rem) Src

func (pos Rem) Src() []byte

func (Rem) Start

func (pos Rem) Start() int

type Reset

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

func (Reset) Column

func (pos Reset) Column() int

func (Reset) End

func (pos Reset) End() int

func (Reset) Line

func (pos Reset) Line() int

func (Reset) Name

func (r Reset) Name() string

func (Reset) Path

func (pos Reset) Path() string

func (Reset) Src

func (pos Reset) Src() []byte

func (Reset) Start

func (pos Reset) Start() int

type ResetValue

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

func (ResetValue) Column

func (pos ResetValue) Column() int

func (ResetValue) End

func (pos ResetValue) End() int

func (ResetValue) Line

func (pos ResetValue) Line() int

func (ResetValue) Name

func (rv ResetValue) Name() string

func (ResetValue) Path

func (pos ResetValue) Path() string

func (ResetValue) Src

func (pos ResetValue) Src() []byte

func (ResetValue) Start

func (pos ResetValue) Start() int

type Return

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

func (Return) Column

func (pos Return) Column() int

func (Return) End

func (pos Return) End() int

func (Return) Line

func (pos Return) Line() int

func (Return) Name

func (r Return) Name() string

func (Return) Path

func (pos Return) Path() string

func (Return) Src

func (pos Return) Src() []byte

func (Return) Start

func (pos Return) Start() int

type Semicolon

type Semicolon struct {
	// contains filtered or unexported fields

} // ;

func (Semicolon) Column

func (pos Semicolon) Column() int

func (Semicolon) End

func (pos Semicolon) End() int

func (Semicolon) Line

func (pos Semicolon) Line() int

func (Semicolon) Name

func (s Semicolon) Name() string

func (Semicolon) Path

func (pos Semicolon) Path() string

func (Semicolon) Src

func (pos Semicolon) Src() []byte

func (Semicolon) Start

func (pos Semicolon) Start() int

type Size

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

func (Size) Column

func (pos Size) Column() int

func (Size) End

func (pos Size) End() int

func (Size) Line

func (pos Size) Line() int

func (Size) Name

func (s Size) Name() string

func (Size) Path

func (pos Size) Path() string

func (Size) Src

func (pos Size) Src() []byte

func (Size) Start

func (pos Size) Start() int

type Static

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

func (Static) Column

func (pos Static) Column() int

func (Static) End

func (pos Static) End() int

func (Static) Line

func (pos Static) Line() int

func (Static) Name

func (s Static) Name() string

func (Static) Path

func (pos Static) Path() string

func (Static) Src

func (pos Static) Src() []byte

func (Static) Start

func (pos Static) Start() int

type Status

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

func (Status) Column

func (pos Status) Column() int

func (Status) End

func (pos Status) End() int

func (Status) Line

func (pos Status) Line() int

func (Status) Name

func (s Status) Name() string

func (Status) Path

func (pos Status) Path() string

func (Status) Src

func (pos Status) Src() []byte

func (Status) Start

func (pos Status) Start() int

type Stream

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

func (Stream) Column

func (pos Stream) Column() int

func (Stream) End

func (pos Stream) End() int

func (Stream) Line

func (pos Stream) Line() int

func (Stream) Name

func (s Stream) Name() string

func (Stream) Path

func (pos Stream) Path() string

func (Stream) Src

func (pos Stream) Src() []byte

func (Stream) Start

func (pos Stream) Start() int

type String

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

func (String) Column

func (pos String) Column() int

func (String) End

func (pos String) End() int

func (String) Line

func (pos String) Line() int

func (String) Name

func (s String) Name() string

func (String) Path

func (pos String) Path() string

func (String) Src

func (pos String) Src() []byte

func (String) Start

func (pos String) Start() int

type Sub

type Sub struct {
	// contains filtered or unexported fields

} // -

func (Sub) Column

func (pos Sub) Column() int

func (Sub) End

func (pos Sub) End() int

func (Sub) Line

func (pos Sub) Line() int

func (Sub) Name

func (s Sub) Name() string

func (Sub) Path

func (pos Sub) Path() string

func (Sub) Precedence

func (s Sub) Precedence() int

func (Sub) Src

func (pos Sub) Src() []byte

func (Sub) Start

func (pos Sub) Start() int

type Time

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

func (Time) Column

func (pos Time) Column() int

func (Time) End

func (pos Time) End() int

func (Time) Line

func (pos Time) Line() int

func (Time) Name

func (t Time) Name() string

func (Time) Path

func (pos Time) Path() string

func (Time) Src

func (pos Time) Src() []byte

func (Time) Start

func (pos Time) Start() int

type Token

type Token interface {
	Start() int
	End() int
	Line() int
	Column() int
	Src() []byte
	Path() string
	Name() string
}

Various token types

func Join

func Join(tok1, tok2 Token) Token

Join joins two tokens and returns None token with position spanning both of them. It is useful for reporting errors spanning multiple tokens.

It panics if:

  • tokens are from different source,
  • tokens are not in the same line,
  • tok1 is after tok2.

func Parse

func Parse(src []byte, path string) ([]Token, error)

Parses src byte array containing the source code and returns token Stream.

type Type

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

func (Type) Column

func (pos Type) Column() int

func (Type) End

func (pos Type) End() int

func (Type) Line

func (pos Type) Line() int

func (Type) Name

func (t Type) Name() string

func (Type) Path

func (pos Type) Path() string

func (Type) Src

func (pos Type) Src() []byte

func (Type) Start

func (pos Type) Start() int

type Width

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

func (Width) Column

func (pos Width) Column() int

func (Width) End

func (pos Width) End() int

func (Width) Line

func (pos Width) Line() int

func (Width) Name

func (w Width) Name() string

func (Width) Path

func (pos Width) Path() string

func (Width) Src

func (pos Width) Src() []byte

func (Width) Start

func (pos Width) Start() int

type Xor

type Xor struct {
	// contains filtered or unexported fields

} // ^

func (Xor) Column

func (pos Xor) Column() int

func (Xor) End

func (pos Xor) End() int

func (Xor) Line

func (pos Xor) Line() int

func (Xor) Name

func (x Xor) Name() string

func (Xor) Path

func (pos Xor) Path() string

func (Xor) Precedence

func (x Xor) Precedence() int

func (Xor) Src

func (pos Xor) Src() []byte

func (Xor) Start

func (pos Xor) Start() int

Jump to

Keyboard shortcuts

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