token

package
v0.0.0-...-f21147f Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2019 License: MIT Imports: 1 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pos

type Pos int

Pos represents a byte position in the original input text

func (Pos) Position

func (p Pos) Position() Pos

type Token

type Token struct {
	Typ TokenType // The type of this token
	Pos Pos       // The starting position, in bytes, of this item in the input string.
	Val string    // The value of this item.
}

Represents a token in the EDIFACT data.

func (Token) String

func (tok Token) String() string

String returns the string corresponding to the token tok.

type TokenType

type TokenType int
const (
	ERROR TokenType = iota // error occurred; value is text of error
	EOF
	COMPONENT_DELIMITER
	DATA_DELIMITER
	DECIMAL
	RELEASE_INDICATOR
	REPETITION_DELIMITER
	SEGMENT_TERMINATOR

	SEGMENT // Identifies beginning of segment and is the segment name
	TEXT
	UNA_SEGMENT
	UNA_TEXT
)

Jump to

Keyboard shortcuts

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