Search


Search something to see results

PlainAstNode

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

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)[];
}

Index

Properties

chi?: (number | PlainAstNode)[]

children

errors?: ErrorDescription[] | null

validation errors

loc?: SourceLocation | null

source location

nam?: string

at-rule / declaration name

optimized?: OptimizedSelector | null

optimized selector

raw?: RawSelectorTokens | null

raw selector

sel?: string

rule selector

state?: EnumAstNodeStatus | null

validation state

tokens?: (number | PlainToken)[] | null

prelude / selector tokens

node type

val?: string | (number | PlainToken)[]

at-rule prelude, comment or declaration value tokens