Class: Entry

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

Constructors

new Entry()

new Entry(value, name): Entry

Parameters

ParameterTypeDescription
valueValue
namenull | Identifier

Returns

Entry

Defined in

src/model/entry.js:80

Properties

equals

equals: undefined | string

Equals sign

Defined in

src/model/entry.js:74


leading

leading: undefined | string

Leading whitespace

Defined in

src/model/entry.js:60


name

name: null | Identifier

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

Defined in

src/model/entry.js:46


trailing

trailing: undefined | string

Trailing whitespace

Defined in

src/model/entry.js:67


value

value: Value

The value of this entry

Defined in

src/model/entry.js:53

Methods

clone()

clone(): Entry

Create an identical copy of this entry

Returns

Entry

Defined in

src/model/entry.js:90


getName()

getName(): null | string

Return the name of this entry, if any

Returns

null | string

Defined in

src/model/entry.js:125


getTag()

getTag(): null | string

Return the tag of this entry, if any

Returns

null | string

See

Value.prototype.getTag

Defined in

src/model/entry.js:106


getValue()

getValue(): Primitive

Return the value of this entry

Returns

Primitive

Defined in

src/model/entry.js:143


isArgument()

isArgument(): boolean

Return whether this entry is an argument

Returns

boolean

Defined in

src/model/entry.js:161


isProperty()

isProperty(): boolean

Return whether this entry is a named property

Returns

boolean

Defined in

src/model/entry.js:170


setName()

setName(name): void

Set the name of this entry to the given name

Parameters

ParameterTypeDescription
nameundefined | null | string

Returns

void

Defined in

src/model/entry.js:134


setTag()

setTag(tag): void

Set the tag of this entry to the given tag

Parameters

ParameterTypeDescription
tagundefined | null | string

Returns

void

See

Value.prototype.setTag

Defined in

src/model/entry.js:116


setValue()

setValue(value): void

Set the name of this entry to the given name

Parameters

ParameterTypeDescription
valuePrimitive

Returns

void

Defined in

src/model/entry.js:152


createArgument()

static createArgument(value): Entry

Create a new argument entry with the given value

Parameters

ParameterTypeDescription
valuePrimitive

Returns

Entry

Defined in

src/model/entry.js:14


createProperty()

static createProperty(name, value): Entry

Create a new property entry for the given key and value

Parameters

ParameterTypeDescription
namestring
valuePrimitive

Returns

Entry

Defined in

src/model/entry.js:25