token

package
v0.0.0-...-ec9fd1c Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2012 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

The token package contains constants for YAML token types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Position

type Position struct {
	Index  int // Index is a 0-based offset from the start of the file.
	Line   int // Line is a 1-based line count.
	Column int // Column is a 1-based column number.  After a newline, the Column will be 1.
}

A Position refers to a location in a YAML document.

func (Position) String

func (pos Position) String() string

String returns a user-friendly representation of a position.

type Token

type Token int

Token holds the type of a token.

const (
	NO_TOKEN Token = iota

	STREAM_START
	STREAM_END

	VERSION_DIRECTIVE
	TAG_DIRECTIVE
	DOCUMENT_START
	DOCUMENT_END

	BLOCK_SEQUENCE_START
	BLOCK_MAPPING_START
	BLOCK_END

	FLOW_SEQUENCE_START
	FLOW_SEQUENCE_END
	FLOW_MAPPING_START
	FLOW_MAPPING_END

	BLOCK_ENTRY
	FLOW_ENTRY
	KEY
	VALUE

	ALIAS
	ANCHOR
	TAG
	SCALAR
)

func (Token) String

func (t Token) String() string

String returns the constant name for the token.

Jump to

Keyboard shortcuts

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