UNPKG

@composita/il

Version:

Composita language IL.

62 lines 2.4 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BooleanDescriptor = exports.CharacterDescriptor = exports.TextDescriptor = exports.FloatDescriptor = exports.IntegerDescriptor = void 0; var IntegerDescriptorTag; (function (IntegerDescriptorTag) { IntegerDescriptorTag[IntegerDescriptorTag["Tag"] = 0] = "Tag"; })(IntegerDescriptorTag || (IntegerDescriptorTag = {})); class IntegerDescriptor { constructor(initialValue = 0) { this._integerDescriptorTag = IntegerDescriptorTag.Tag; this.initialValue = Math.trunc(initialValue); } } exports.IntegerDescriptor = IntegerDescriptor; var FloatDescriptorTag; (function (FloatDescriptorTag) { FloatDescriptorTag[FloatDescriptorTag["Tag"] = 0] = "Tag"; })(FloatDescriptorTag || (FloatDescriptorTag = {})); class FloatDescriptor { constructor(initialValue = 0) { this._floatDescriptorTag = FloatDescriptorTag.Tag; this.initialValue = initialValue; } } exports.FloatDescriptor = FloatDescriptor; var TextDescriptorTag; (function (TextDescriptorTag) { TextDescriptorTag[TextDescriptorTag["Tag"] = 0] = "Tag"; })(TextDescriptorTag || (TextDescriptorTag = {})); class TextDescriptor { constructor(initialValue = '') { this._TextDescriptorTag = TextDescriptorTag.Tag; this.initialValue = initialValue; } } exports.TextDescriptor = TextDescriptor; var CharacterDescriptorTag; (function (CharacterDescriptorTag) { CharacterDescriptorTag[CharacterDescriptorTag["Tag"] = 0] = "Tag"; })(CharacterDescriptorTag || (CharacterDescriptorTag = {})); class CharacterDescriptor { constructor(initialValue = '') { this._characterDescriptorTag = CharacterDescriptorTag.Tag; if (initialValue.length > 1) { throw new Error('CharacterDescriptor initialValue lenght > 1'); } this.initialValue = initialValue; } } exports.CharacterDescriptor = CharacterDescriptor; var BooleanDescriptorTag; (function (BooleanDescriptorTag) { BooleanDescriptorTag[BooleanDescriptorTag["Tag"] = 0] = "Tag"; })(BooleanDescriptorTag || (BooleanDescriptorTag = {})); class BooleanDescriptor { constructor(initialValue = false) { this._booleanDescriptorTag = BooleanDescriptorTag.Tag; this.initialValue = initialValue; } } exports.BooleanDescriptor = BooleanDescriptor; //# sourceMappingURL=builtin.js.map