Documentation
¶
Overview ¶
Package ast provides a token lexer and ast scanner for xelf.
Index ¶
- Constants
- type Ast
- type Doc
- type Error
- func ErrAdjZero(t Tok) *Error
- func ErrEval(s Src, name string, err error) *Error
- func ErrExpect(a Ast, kind knd.Kind) *Error
- func ErrExpectSym(a Ast) *Error
- func ErrExpectTag(a Ast) *Error
- func ErrInvalid(a Ast, kind knd.Kind, err error) *Error
- func ErrInvalidBool(a Ast) *Error
- func ErrInvalidParams(a Ast) *Error
- func ErrInvalidSep(t Tok) *Error
- func ErrInvalidTag(t Tok) *Error
- func ErrInvalidType(s Src, raw string) *Error
- func ErrLayout(s Src, t fmt.Stringer, err error) *Error
- func ErrNumExpo(t Tok) *Error
- func ErrNumFrac(t Tok) *Error
- func ErrReslSpec(s Src, name string, err error) *Error
- func ErrReslSym(s Src, sym string, err error) *Error
- func ErrReslTyp(s Src, t interface{}, err error) *Error
- func ErrStrTerm(t Tok) *Error
- func ErrTokStart(t Tok) *Error
- func ErrTreeTerm(t Tok) *Error
- func ErrUnexpected(a Ast) *Error
- func ErrUnexpectedExp(s Src, e interface{}) *Error
- func ErrUnify(s Src, name string) *Error
- func ErrUnquote(t Tok, err error) *Error
- func ErrUserErr(s Src, name string, err error) *Error
- type Formatter
- type Lexer
- type Pos
- type SimpleFormat
- type Src
- type Tok
Constants ¶
View Source
const ( FmtMin uint16 = 1 << iota FmtMax FmtLst )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
Error in addition to a name has a source position, error code and optional help message.
func ErrAdjZero ¶
func ErrExpectSym ¶
func ErrExpectTag ¶
func ErrInvalidBool ¶
func ErrInvalidParams ¶
func ErrInvalidSep ¶
func ErrInvalidTag ¶
func ErrInvalidType ¶
func ErrNumExpo ¶
func ErrNumFrac ¶
func ErrReslTyp ¶
func ErrStrTerm ¶
func ErrTokStart ¶
func ErrTreeTerm ¶
func ErrUnexpected ¶
func ErrUnexpectedExp ¶
func ErrUnquote ¶
type Lexer ¶
type Lexer struct {
// contains filtered or unexported fields
}
Lexer is simple token lexer.
type Pos ¶
type Pos struct {
Line int32 // line number 1-indexed
Byte int32 // byte offset within the line 0-indexed
}
Pos holds the line number and byte offset.
type SimpleFormat ¶
Click to show internal directories.
Click to hide internal directories.