@faubulous/mentor-rdf-serializers
    Preparing search index...

    Interface BaseFormatterContext

    Base formatting context with fields shared by all token-based formatters. Subclasses extend this to add format-specific state.

    interface BaseFormatterContext {
        currentLineLength: number;
        indentLevel: number;
        inlineStatement: boolean;
        inPrefix: boolean;
        lastNonWsToken: IToken | null;
        lastSubject: string | null;
        lastToken: IToken | null;
        lastWasComment: boolean;
        lastWasNewline: boolean;
        needsBlankLine: boolean;
        needsNewline: boolean;
        needsSpace: boolean;
        parts: string[];
        scopeStack: Scope[];
        sourceNewline: boolean;
        triplePosition: number;
    }
    Index

    Properties

    currentLineLength: number

    Current line length (for wrapping).

    indentLevel: number

    Current indent nesting level.

    inlineStatement: boolean

    Whether the current statement should be rendered on a single line.

    inPrefix: boolean

    Whether we are inside a prefix/base declaration.

    lastNonWsToken: IToken | null

    The last non-whitespace token that was processed (excluding WS but including comments).

    lastSubject: string | null

    Last-seen subject image (for blank line insertion).

    lastToken: IToken | null

    The last token that was processed (including whitespace and comments).

    lastWasComment: boolean

    Indicates whether the last emitted part was a comment (for spacing decisions).

    lastWasNewline: boolean

    Indicates whether the last emitted part ended with a newline (for spacing decisions).

    needsBlankLine: boolean

    A blank line should be emitted before the next token.

    needsNewline: boolean

    A newline should be emitted before the next token.

    needsSpace: boolean

    A space should be emitted before the next token.

    parts: string[]

    Accumulated output parts.

    scopeStack: Scope[]

    The scope stack.

    sourceNewline: boolean

    Whether the pending newline originated from source positions.

    triplePosition: number

    Triple position counter (0=subject, 1=predicate, 2=object).