css_lexer

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentsOfStringToken

func ContentsOfStringToken(raw string) string

func ContentsOfURLToken

func ContentsOfURLToken(raw string) string

func QuoteForStringToken

func QuoteForStringToken(text string) string

Types

type T

type T uint8
const (
	TEndOfFile T = iota

	TAtKeyword
	TBadString
	TBadURL
	TCDC // "-->"
	TCDO // "<!--"
	TCloseBrace
	TCloseBracket
	TCloseParen
	TColon
	TComma
	TDelim
	TDelimAmpersand
	TDelimAsterisk
	TDelimBar
	TDelimCaret
	TDelimDollar
	TDelimDot
	TDelimEquals
	TDelimExclamation
	TDelimGreaterThan
	TDelimPlus
	TDelimTilde
	TDimension
	TFunction
	THash
	THashID
	TIdent
	TNumber
	TOpenBrace
	TOpenBracket
	TOpenParen
	TPercentage
	TSemicolon
	TString
	TURL
	TWhitespace
)

func (T) String

func (t T) String() string

type Token

type Token struct {
	Kind  T
	Range logger.Range
}

func Tokenize

func Tokenize(log logger.Log, source logger.Source) (tokens []Token)

func (Token) Raw

func (token Token) Raw(contents string) string

Jump to

Keyboard shortcuts

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