package css_ast
import "github.com/evanw/esbuild/internal/css_ast"
Index ¶
- type AST
- type ComplexSelector
- type CompoundSelector
- type KeyframeBlock
- type NamespacedName
- type R
- type RAtCharset
- type RAtImport
- type RAtKeyframes
- type RAtNamespace
- type RBadDeclaration
- type RDeclaration
- type RKnownAt
- type RQualified
- type RSelector
- type RUnknownAt
- type SS
- type SSAttribute
- type SSClass
- type SSHash
- type SSPseudoClass
- type Token
Types ¶
type AST ¶
type AST struct { ImportRecords []ast.ImportRecord Rules []R }
type ComplexSelector ¶
type ComplexSelector struct { Selectors []CompoundSelector }
type CompoundSelector ¶
type CompoundSelector struct { HasNestPrefix bool // "&" Combinator string // Optional, may be "" TypeSelector *NamespacedName SubclassSelectors []SS PseudoClassSelectors []SSPseudoClass // If present, these follow a ":" character }
type KeyframeBlock ¶
type NamespacedName ¶
type NamespacedName struct { // If present, this is an identifier or "*" or "" and is followed by a "|" character NamespacePrefix *string // This is an identifier or "*" or "&" Name string }
type R ¶
type R interface {
// contains filtered or unexported methods
}
This interface is never called. Its purpose is to encode a variant type in Go's type system.
type RAtCharset ¶
type RAtCharset struct { Encoding string }
type RAtImport ¶
type RAtImport struct { ImportRecordIndex uint32 }
type RAtKeyframes ¶
type RAtKeyframes struct { AtToken string Name string Blocks []KeyframeBlock }
type RAtNamespace ¶
type RBadDeclaration ¶
type RBadDeclaration struct { Tokens []Token }
type RDeclaration ¶
type RKnownAt ¶
type RQualified ¶
type RSelector ¶
type RSelector struct { Selectors []ComplexSelector Rules []R }
type RUnknownAt ¶
type SS ¶
type SS interface {
// contains filtered or unexported methods
}
This interface is never called. Its purpose is to encode a variant type in Go's type system.
type SSAttribute ¶
type SSAttribute struct { NamespacedName NamespacedName MatcherOp string MatcherValue string MatcherModifier byte }
type SSClass ¶
type SSClass struct { Name string }
type SSHash ¶
type SSHash struct { Name string }
type SSPseudoClass ¶
type Token ¶
type Token struct { // This is the raw contents of the token most of the time. However, it // contains the decoded string contents for "TString" tokens. Text string // 16 bytes // Contains the child tokens for component values that are simple blocks. // These are either "(", "{", "[", or function tokens. The closing token is // implicit and is not stored. Children *[]Token // 8 bytes // URL tokens have an associated import record at the top-level of the AST. // This index points to that import record. ImportRecordIndex uint32 // 4 bytes // This will never be "TWhitespace" because whitespace isn't stored as a // token directly. Instead it is stored in "HasWhitespaceAfter" on the // previous token. Kind css_lexer.T // 1 byte // This is generally true if there was a "TWhitespace" token before this // token. This isn't strictly true in some cases because sometimes this flag // is changed to make the generated code look better (e.g. around commas). HasWhitespaceAfter bool // 1 byte }
We create a lot of tokens, so make sure this layout is memory-efficient. The layout here isn't optimal because it biases for convenience (e.g. "string" could be shorter) but at least the ordering of fields was deliberately chosen to minimize size.
Source Files ¶
- Version
- v0.7.8
- Published
- Sep 29, 2020
- Platform
- windows/amd64
- Imports
- 2 packages
- Last checked
- 3 hours ago –
Tools for package owners.