Class: Entry

Defined in: src/model/entry.js:7

An entry represents either an argument or a property to a node

Constructors

new Entry()

new Entry(value, name): Entry

Defined in: src/model/entry.js:80

Parameters

ParameterTypeDescription
valueValue
namenull | Identifier

Returns

Entry

Properties

equals

equals: undefined | string

Defined in: src/model/entry.js:74

Equals sign


leading

leading: undefined | string

Defined in: src/model/entry.js:60

Leading whitespace


name

name: null | Identifier

Defined in: src/model/entry.js:46

The name of this entry if it's a property, or null if it's an argument


trailing

trailing: undefined | string

Defined in: src/model/entry.js:67

Trailing whitespace


value

value: Value

Defined in: src/model/entry.js:53

The value of this entry

Methods

clone()

clone(): Entry

Defined in: src/model/entry.js:90

Create an identical copy of this entry

Returns

Entry


getName()

getName(): null | string

Defined in: src/model/entry.js:125

Return the name of this entry, if any

Returns

null | string


getTag()

getTag(): null | string

Defined in: src/model/entry.js:106

Return the tag of this entry, if any

Returns

null | string

See

Value.prototype.getTag


getValue()

getValue(): Primitive

Defined in: src/model/entry.js:143

Return the value of this entry

Returns

Primitive


isArgument()

isArgument(): boolean

Defined in: src/model/entry.js:161

Return whether this entry is an argument

Returns

boolean


isProperty()

isProperty(): boolean

Defined in: src/model/entry.js:170

Return whether this entry is a named property

Returns

boolean


setName()

setName(name): void

Defined in: src/model/entry.js:134

Set the name of this entry to the given name

Parameters

ParameterTypeDescription
nameundefined | null | string

Returns

void


setTag()

setTag(tag): void

Defined in: src/model/entry.js:116

Set the tag of this entry to the given tag

Parameters

ParameterTypeDescription
tagundefined | null | string

Returns

void

See

Value.prototype.setTag


setValue()

setValue(value): void

Defined in: src/model/entry.js:152

Set the name of this entry to the given name

Parameters

ParameterTypeDescription
valuePrimitive

Returns

void


createArgument()

static createArgument(value): Entry

Defined in: src/model/entry.js:14

Create a new argument entry with the given value

Parameters

ParameterTypeDescription
valuePrimitive

Returns

Entry


createProperty()

static createProperty(name, value): Entry

Defined in: src/model/entry.js:25

Create a new property entry for the given key and value

Parameters

ParameterTypeDescription
namestring
valuePrimitive

Returns

Entry