token

package
v0.0.0-...-41221c5 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Offset

func Offset(token Token) int

Types

type AtKeyword

type AtKeyword struct {
	Offset int
	Value  string
}

func (AtKeyword) VisitToken

func (t AtKeyword) VisitToken(v TokenVisitor)

type CloseCurly

type CloseCurly struct {
	Offset int
}

func (CloseCurly) VisitToken

func (t CloseCurly) VisitToken(v TokenVisitor)

type CloseParen

type CloseParen struct {
	Offset int
}

func (CloseParen) VisitToken

func (t CloseParen) VisitToken(v TokenVisitor)

type CloseSquare

type CloseSquare struct {
	Offset int
}

func (CloseSquare) VisitToken

func (t CloseSquare) VisitToken(v TokenVisitor)

type Colon

type Colon struct {
	Offset int
}

func (Colon) VisitToken

func (t Colon) VisitToken(v TokenVisitor)

type Comma

type Comma struct {
	Offset int
}

func (Comma) VisitToken

func (t Comma) VisitToken(v TokenVisitor)

type Delim

type Delim struct {
	Offset int
	Value  rune
}

func (Delim) VisitToken

func (t Delim) VisitToken(v TokenVisitor)

type Dimension

type Dimension struct {
	Offset  int
	Value   float64
	Integer bool
	Unit    string
}

func (Dimension) VisitToken

func (t Dimension) VisitToken(v TokenVisitor)

type Function

type Function struct {
	Offset int
	Value  string
}

func (Function) VisitToken

func (t Function) VisitToken(v TokenVisitor)

type Hash

type Hash struct {
	Offset int
	Value  string
	Id     bool
}

func (Hash) VisitToken

func (t Hash) VisitToken(v TokenVisitor)

type Ident

type Ident struct {
	Offset int
	Value  string
}

func (Ident) VisitToken

func (t Ident) VisitToken(v TokenVisitor)

type Number

type Number struct {
	Offset  int
	Value   float64
	Integer bool
}

func (Number) VisitToken

func (t Number) VisitToken(v TokenVisitor)

type OpenCurly

type OpenCurly struct {
	Offset int
}

func (OpenCurly) VisitToken

func (t OpenCurly) VisitToken(v TokenVisitor)

type OpenParen

type OpenParen struct {
	Offset int
}

func (OpenParen) VisitToken

func (t OpenParen) VisitToken(v TokenVisitor)

type OpenSquare

type OpenSquare struct {
	Offset int
}

func (OpenSquare) VisitToken

func (t OpenSquare) VisitToken(v TokenVisitor)

type Percentage

type Percentage struct {
	Offset int
	Value  float64
}

func (Percentage) VisitToken

func (t Percentage) VisitToken(v TokenVisitor)

type Semicolon

type Semicolon struct {
	Offset int
}

func (Semicolon) VisitToken

func (t Semicolon) VisitToken(v TokenVisitor)

type String

type String struct {
	Offset int
	Mark   rune
	Value  string
}

func (String) VisitToken

func (t String) VisitToken(v TokenVisitor)

type Token

type Token interface {
	VisitToken(TokenVisitor)
}

type TokenVisitor

type TokenVisitor struct {
	Ident       func(Ident)
	Function    func(Function)
	AtKeyword   func(AtKeyword)
	Hash        func(Hash)
	String      func(String)
	Url         func(Url)
	Delim       func(Delim)
	Number      func(Number)
	Percentage  func(Percentage)
	Dimension   func(Dimension)
	Whitespace  func(Whitespace)
	Colon       func(Colon)
	Semicolon   func(Semicolon)
	Comma       func(Comma)
	OpenSquare  func(OpenSquare)
	CloseSquare func(CloseSquare)
	OpenParen   func(OpenParen)
	CloseParen  func(CloseParen)
	OpenCurly   func(OpenCurly)
	CloseCurly  func(CloseCurly)
}

type Url

type Url struct {
	Offset int
	Value  string
}

func (Url) VisitToken

func (t Url) VisitToken(v TokenVisitor)

type Whitespace

type Whitespace struct {
	Offset int
}

func (Whitespace) VisitToken

func (t Whitespace) VisitToken(v TokenVisitor)

Jump to

Keyboard shortcuts

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