@eagleoutice/flowr - v2.17.4
    Preparing search index...

    Variable SourceRange

    SourceRange: {
        add(
            this: void,
            __namedParameters: readonly [
                Line,
                Column,
                Line,
                Column,
                string
                | undefined,
            ],
            __namedParameters: readonly [
                Line,
                Column,
                Line,
                Column,
                string
                | undefined,
            ],
        ): SourceRange;
        combineRanges(this: void, ...ranges: SourceRange[]): SourceRange[];
        compare(
            this: void,
            __namedParameters: readonly [
                Line,
                Column,
                Line,
                Column,
                string
                | undefined,
            ],
            __namedParameters: readonly [
                Line,
                Column,
                Line,
                Column,
                string
                | undefined,
            ],
        ): number;
        containsPosition(
            this: void,
            __namedParameters: readonly [
                Line,
                Column,
                Line,
                Column,
                string
                | undefined,
            ],
            line: Line,
            column?: Column,
        ): boolean;
        equals(
            this: void,
            __namedParameters: readonly [
                Line,
                Column,
                Line,
                Column,
                string
                | undefined,
            ],
            __namedParameters: readonly [
                Line,
                Column,
                Line,
                Column,
                string
                | undefined,
            ],
        ): boolean;
        format(
            this: void,
            range:
                | readonly [Line, Column, Line, Column, string | undefined]
                | undefined,
        ): string;
        formatPosition(this: void, pos: SourcePosition | undefined): string;
        from(
            this: void,
            sl: string | Line,
            sc: string | Column,
            el?: string | Line,
            ec?: string | Column,
        ): SourceRange;
        fromNode<OtherInfo>(
            this: void,
            node: RNode<OtherInfo> | undefined,
        ): SourceRange | undefined;
        getEnd: Accessor<
            readonly [Line, Column, Line, Column, string | undefined],
            SourcePosition,
        >;
        getEndColumn: Accessor<
            readonly [Line, Column, Line, Column, string | undefined],
            Column,
        >;
        getEndLine: Accessor<
            readonly [Line, Column, Line, Column, string | undefined],
            Line,
        >;
        getStart: Accessor<
            readonly [Line, Column, Line, Column, string | undefined],
            SourcePosition,
        >;
        getStartColumn: Accessor<
            readonly [Line, Column, Line, Column, string | undefined],
            Column,
        >;
        getStartLine: Accessor<
            readonly [Line, Column, Line, Column, string | undefined],
            Line,
        >;
        innermostNodes<OtherInfo>(
            this: void,
            nodes: readonly RNodeWithParent<OtherInfo>[],
            treatChildAsInner?: boolean,
        ): RNodeWithParent<OtherInfo>[];
        invalid(this: void): SourceRange;
        isSingleLine(
            this: void,
            range: readonly [Line, Column, Line, Column, string | undefined],
        ): boolean;
        isStrictSubsetOf(
            this: void,
            r1: readonly [Line, Column, Line, Column, string | undefined],
            r2: readonly [Line, Column, Line, Column, string | undefined],
        ): boolean;
        isSubsetOf(
            this: void,
            __namedParameters: readonly [
                Line,
                Column,
                Line,
                Column,
                string
                | undefined,
            ],
            __namedParameters: readonly [
                Line,
                Column,
                Line,
                Column,
                string
                | undefined,
            ],
        ): boolean;
        isValid(
            this: void,
            range:
                | readonly [Line, Column, Line, Column, string | undefined]
                | undefined,
        ): range is readonly [Line, Column, Line, Column, string | undefined];
        lineCount(
            this: void,
            range: readonly [Line, Column, Line, Column, string | undefined],
        ): number;
        merge(
            this: void,
            rs: readonly (
                readonly [Line, Column, Line, Column, (...) | (...)]
                | undefined
            )[],
        ): SourceRange;
        name: "SourceRange";
        nodesContaining<OtherInfo>(
            this: void,
            nodes: readonly RNodeWithParent<OtherInfo>[],
            line: Line,
            column?: Column,
        ): RNodeWithParent<OtherInfo>[];
        overlap(
            this: void,
            r1: readonly [Line, Column, Line, Column, string | undefined],
            r2: readonly [Line, Column, Line, Column, string | undefined],
        ): boolean;
        ownFromNode<OtherInfo>(
            this: void,
            node: RNode<OtherInfo> | undefined,
        ): SourceRange | undefined;
        startsCompletelyBefore(
            this: void,
            __namedParameters: readonly [
                Line,
                Column,
                Line,
                Column,
                string
                | undefined,
            ],
            __namedParameters: readonly [
                Line,
                Column,
                Line,
                Column,
                string
                | undefined,
            ],
        ): boolean;
        view: Accessor<
            readonly [Line, Column, Line, Column, string | undefined],
            SourceLocationView,
        >;
    }

    Utility functions for source ranges.

    Type Declaration

    • add: function
      • Calculates the component-wise sum of two ranges.

        Parameters

        Returns SourceRange

    • combineRanges: function
      • Reduces the ranges to those no other one contains, keeping the first of any duplicates. Ranges that merely overlap are both kept, as neither contains the other. A non-empty input always yields a non-empty result.

        Parameters

        Returns SourceRange[]

        SourceRange.merge for merging multiple ranges into a single range.

    • compare: function
      • Provides a comparator for SourceRanges that sorts them in ascending order.

        Parameters

        Returns number

        a positive number if r1 comes after r2, a negative number if r1 comes before r2, and 0 if they are equal

    • containsPosition: function
      • Checks if a given position (line, column) is contained within the range. Omitting the column checks whether the line is covered at all.

        Parameters

        Returns boolean

    • equals: function
      • Checks if two ranges are equal (i.e., they start and end at the same position).

        Parameters

        Returns boolean

    • format: function
      • Prints a range as a human-readable string.

        Parameters

        Returns string

    • formatPosition: function
    • from: function
      • Creates a source range from the given line and column numbers.

        Parameters

        • this: void
        • sl: string | Line

          start line

        • sc: string | Column

          start column

        • el: string | Line = sl

          end line

        • ec: string | Column = sc

          end column

        Returns SourceRange

    • fromNode: function
    • ReadonlygetEnd: Accessor<
          readonly [Line, Column, Line, Column, string | undefined],
          SourcePosition,
      >

      Returns the end position of a source range, or undefined if there is no range.

    • ReadonlygetEndColumn: Accessor<readonly [Line, Column, Line, Column, string | undefined], Column>

      Returns the end column of a source range, or undefined if there is no range.

    • ReadonlygetEndLine: Accessor<readonly [Line, Column, Line, Column, string | undefined], Line>

      Returns the end line of a source range, or undefined if there is no range.

    • ReadonlygetStart: Accessor<
          readonly [Line, Column, Line, Column, string | undefined],
          SourcePosition,
      >

      Returns the start position of a source range, or undefined if there is no range.

    • ReadonlygetStartColumn: Accessor<readonly [Line, Column, Line, Column, string | undefined], Column>

      Returns the start column of a source range, or undefined if there is no range.

    • ReadonlygetStartLine: Accessor<readonly [Line, Column, Line, Column, string | undefined], Line>

      Returns the start line of a source range, or undefined if there is no range.

    • innermostNodes: function
      • Collects all nodes satisfying the innermost condition: those containing no other of the given nodes.

        Nodes may share a range (a function call and the symbol naming it do), so treatChildAsInner decides that tie: with it, a node sharing its parent's range counts as the inner one and the parent drops out; without it, both are kept and the caller may pick between them (e.g. by node type).

        A non-empty input always yields a non-empty result: enclosure is a strict order so some node is always minimal, and a node carrying no range at all is kept rather than dropped.

        Type Parameters

        • OtherInfo

        Parameters

        Returns RNodeWithParent<OtherInfo>[]

        SourceRange.nodesContaining which this usually narrows down

    • invalid: function
    • isSingleLine: function
    • isStrictSubsetOf: function
    • isSubsetOf: function
      • Checks if the first range is a subset of the second range.

        Parameters

        Returns boolean

    • isValid: function
    • lineCount: function
      • The number of lines the range spans (always at least 1 for a valid range).

        Parameters

        Returns number

    • merge: function
      • Merges multiple source ranges into a single source range that spans from the earliest start to the latest end. If you are interested in reducing a set of ranges to those none of the others contains, see combineRanges.

        Parameters

        Returns SourceRange

        if no ranges are provided

    • Readonlyname: "SourceRange"
    • nodesContaining: function
    • overlap: function
    • ownFromNode: function
    • startsCompletelyBefore: function
      • Parameters

        Returns boolean

        true iff r1 starts and ends before r2 starts (i.e., if r1 and r2 do not overlap and r1 comes before r2

    • Readonlyview: Accessor<
          readonly [Line, Column, Line, Column, string | undefined],
          SourceLocationView,
      >

      Wraps the range in a view offering property access (range.startLine) and methods. The view does not copy the tuple; see SourceLocationView for when to use it.

    location