avocado-old/packages/behavior/item/literal.js
2019-04-25 00:48:53 -05:00

31 lines
367 B
JavaScript

export class Literal {
constructor() {
this.value = null;
}
clone(other) {
this.value = other.value;
}
fromJSON(json) {
this.value = json.value;
return this;
}
get(context) {
return this.value;
}
set(value) {
this.value = value;
}
toJSON() {
return {
type: 'literal',
value: this.value,
}
}
}