A key-value container where keys are strings (variable names) and values are any ParserEntity. Supports element-wise arithmetic operations.

remarks

The optional constructor Map is retained rather than copied. set and merge also retain value references, while copy copies every stored parser entity. Arrays returned by keys, values, and entries are new arrays, but their values still refer to the stored entities. Iteration and text output preserve Map insertion order. Replacing an existing key does not move it. each can replace values in place; returning nothing from its callback leaves a value unchanged. Use forEach for observation-only traversal. Evaluation and expansion return deep copies. Dictionaries support structural equality by key and value but define no greater-than or less-than ordering. Syntax: {x => 1, y => 2, z => x+3} Access: d[x] → 1, d[y] → 2 Assign: d[y]: 10

Members

__get__(indices: string | number[]): ParserEntityMethod

Returns the element for the given string key. Used by the parser for bracket indexing: d[x] → d.getter('x')

Parameters

NameTypeDescription
indicesstring | number[]—

Returns

ParserEntity

__set__(indices: string | number[], value: ParserEntity): voidMethod

Sets the element for the given string key. Used by the parser for bracket assignment: d[x]: 5

Parameters

NameTypeDescription
indicesstring | number[]—
valueParserEntity—

Returns

void

[iterator](): IterableIterator<[string, ParserEntity]>Method

Iterates over [key, value] pairs in insertion order.

Returns

IterableIterator<[string, ParserEntity]>

buildFunction(argsArray?: string[]): (...args: number[]): numberMethod

Compiles this value to a native JavaScript-number function when the parsed result is an Expression. Structured parser results expose this method so values returned by nerdamer(...) have one consistent TypeScript surface, but they cannot be compiled as scalar functions and throw core!UnexpectedDataType when called.

Parameters

NameTypeDescription
argsArraystring[]Optional variable names in positional call order.

Returns

(...args: number[]): number — A JavaScript-number function compiled from the scalar expression.

count(): numberMethod

Number of entries.

Returns

number

dataType: "DIC"Property

No description is available yet.

delete(key: string): booleanMethod

Removes a key-value pair.

Parameters

NameTypeDescription
keystring—

Returns

boolean

dimensions(): number[]Method

No description is available yet.

Returns

number[]

dimensionsMatch(x: ParserEntity): xMethod

No description is available yet.

Parameters

NameTypeDescription
xParserEntity—

Returns

x

each(callback: (e: ParserEntity, i?: string | number, j?: string | number): void | ParserEntity): DictionaryMethod

Visits or replaces entries in insertion order. Returning a ParserEntity replaces the current value. Returning void leaves that value unchanged, so callers can inspect a Dictionary without a dummy return. The callback receives the value and string key.

Parameters

NameTypeDescription
callback(e: ParserEntity, i?: string | number, j?: string | number): void | ParserEntity—

Returns

Dictionary

elements(): ParserEntity[]API

Satisfies the StructuredEntity abstract property. Returns the values as an array for compatibility with element-wise operations.

Parameters

NameTypeDescription
valuesParserEntity[]—

Returns

ParserEntity[]

entries(): [string, ParserEntity][]Method

Returns all entries in insertion order as a new pair array. Stored value objects are not copied.

Returns

[string, ParserEntity][]

eq(other: ParserEntity): booleanMethod

No description is available yet.

Parameters

NameTypeDescription
otherParserEntity—

Returns

boolean

evaluate(): DictionaryMethod

Evaluates a copied Dictionary, leaving this one unchanged.

Returns

Dictionary

forEach(callback: (value: ParserEntity, key: string): void): voidMethod

Visits stored value references without changing the Dictionary.

Parameters

NameTypeDescription
callback(value: ParserEntity, key: string): void—

Returns

void

get(key: string): ParserEntity | undefinedMethod

Gets the stored value reference by key, or undefined when absent.

Parameters

NameTypeDescription
keystring—

Returns

ParserEntity | undefined

gt(_other: ParserEntity): booleanMethod

No description is available yet.

Parameters

NameTypeDescription
_otherParserEntity—

Returns

boolean

gte(other: ParserEntity): booleanMethod

No description is available yet.

Parameters

NameTypeDescription
otherParserEntity—

Returns

boolean

has(key: string): booleanMethod

Checks if a key exists.

Parameters

NameTypeDescription
keystring—

Returns

boolean

isDictionary(obj: unknown): objMethod

No description is available yet.

Parameters

NameTypeDescription
objunknown—

Returns

obj

isEnumerable: booleanProperty

No description is available yet.

keys(): string[]Method

Returns all keys.

Returns

string[]

lt(_other: ParserEntity): booleanMethod

No description is available yet.

Parameters

NameTypeDescription
_otherParserEntity—

Returns

boolean

lte(other: ParserEntity): booleanMethod

No description is available yet.

Parameters

NameTypeDescription
otherParserEntity—

Returns

boolean

merge(other: Dictionary): DictionaryMethod

Merges another Dictionary into this one. Existing keys are overwritten and incoming value references are retained.

Parameters

NameTypeDescription
otherDictionary—

Returns

Dictionary

precision: numberProperty

No description is available yet.

text(): stringMethod

No description is available yet.

Returns

string

toString(): stringMethod

No description is available yet.

Returns

string