PlainAstNode
interface PlainAstNode {
chi?: (number | PlainAstNode)[];
errors?: ErrorDescription[] | null;
loc?: SourceLocation | null;
nam?: string;
optimized?: OptimizedSelector | null;
raw?: RawSelectorTokens | null;
sel?: string;
state?: EnumAstNodeStatus | null;
tokens?: (number | PlainToken)[] | null;
typ: EnumToken;
val?: string | (number | PlainToken)[];
}
chi?: (number | PlainAstNode)[];
errors?: ErrorDescription[] | null;
loc?: SourceLocation | null;
nam?: string;
optimized?: OptimizedSelector | null;
raw?: RawSelectorTokens | null;
sel?: string;
state?: EnumAstNodeStatus | null;
tokens?: (number | PlainToken)[] | null;
typ: EnumToken;
val?: string | (number | PlainToken)[];
}
Index
Properties
Properties
Optionalchi
children
Optionalerrors
validation errors
Optionalloc
source location
Optionalnam
nam?: string
at-rule / declaration name
Optionaloptimized
optimized?: OptimizedSelector | null
optimized selector
Optionalraw
raw selector
Optionalsel
sel?: string
rule selector
Optionalstate
validation state
Optionaltokens
prelude / selector tokens
typ
node type
Optionalval
at-rule prelude, comment or declaration value tokens
plain object representation of an ast node (
arena.toPlainObject()/arena.fromObject()).arena.toObject()returns an AstArenaNode view with the same properties. The library only deals with node ids internally