token

package
v0.0.0-...-5c1ce85 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package token defines constants representing the lexical tokens of LaTeX documents.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kind

type Kind int

Kind is a kind of LaTeX token.

const (
	Invalid Kind = iota
	Macro
	EmptyLine
	Comment
	Space
	Word
	Number
	Symbol // +,-,?,>,>=,...
	Lbrace
	Rbrace
	Lbrack
	Rbrack
	Lparen
	Rparen
	Other
	Verbatim
	EOF
)

func (Kind) String

func (i Kind) String() string

type Pos

type Pos = token.Pos

Pos is a compact encoding of a source position within a file set.

Aliased from go/token.Pos

type Token

type Token struct {
	Kind Kind // Kind is the kind of token.
	Pos  Pos  // Pos is the position of a token.
	Text string
}

Token holds informations about a token.

func (Token) String

func (t Token) String() string

Jump to

Keyboard shortcuts

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