Source File
css_ast.go
Belonging Package
github.com/evanw/esbuild/internal/css_ast
package css_ast
import (
)
type AST struct {
ImportRecords []ast.ImportRecord
Rules []R
}
ImportRecordIndex uint32 // 4 bytes
UnitOffset uint16 // 2 bytes
Whitespace WhitespaceFlags // 1 byte
}
type WhitespaceFlags uint8
const (
WhitespaceBefore WhitespaceFlags = 1 << iota
WhitespaceAfter
)
func ( Token) () string {
return .Text[:len(.Text)-1]
}
func ( Token) () string {
return .Text[:.UnitOffset]
}
func ( Token) () string {
return .Text[.UnitOffset:]
}
type R interface {
isRule()
}
type RAtCharset struct {
Encoding string
}
type RAtImport struct {
ImportRecordIndex uint32
}
type RAtKeyframes struct {
AtToken string
Name string
Blocks []KeyframeBlock
}
type KeyframeBlock struct {
Selectors []string
Rules []R
}
type RKnownAt struct {
AtToken string
Prelude []Token
Rules []R
}
type RUnknownAt struct {
AtToken string
Prelude []Token
Block []Token
}
type RSelector struct {
Selectors []ComplexSelector
Rules []R
}
type RQualified struct {
Prelude []Token
Rules []R
}
type RDeclaration struct {
KeyText string
Value []Token
KeyRange logger.Range
Key D // Compare using this instead of "Key" for speed
Important bool
}
type RBadDeclaration struct {
Tokens []Token
}
func (*RAtCharset) () {}
func (*RAtImport) () {}
func (*RAtKeyframes) () {}
func (*RKnownAt) () {}
func (*RUnknownAt) () {}
func (*RSelector) () {}
func (*RQualified) () {}
func (*RDeclaration) () {}
func (*RBadDeclaration) () {}
type ComplexSelector struct {
Selectors []CompoundSelector
}
type CompoundSelector struct {
HasNestPrefix bool // "&"
Combinator string // Optional, may be ""
TypeSelector *NamespacedName
SubclassSelectors []SS
PseudoClassSelectors []SSPseudoClass // If present, these follow a ":" character
}
type NameToken struct {
Kind css_lexer.T
Text string
}
type SS interface {
isSubclassSelector()
}
type SSHash struct {
Name string
}
type SSClass struct {
Name string
}
type SSAttribute struct {
NamespacedName NamespacedName
MatcherOp string
MatcherValue string
MatcherModifier byte
}
type SSPseudoClass struct {
Name string
Args []Token
}
func (*SSHash) () {}
func (*SSClass) () {}
func (*SSAttribute) () {}
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |