UNPKG

@composita/il

Version:

Composita language IL.

93 lines 3.12 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SystemCallDescriptor = exports.JumpDescriptor = exports.MessageDescriptor = exports.ProtocolDescriptor = exports.InterfaceDescriptor = exports.CodeBlockDescriptor = exports.VariableDescriptor = exports.ImplementationDescriptor = exports.ProcedureDescriptor = exports.ComponentDescriptor = exports.DeclarationDescriptor = void 0; class DeclarationDescriptor { constructor() { this.init = new CodeBlockDescriptor(); this.variables = new Array(); this.procedures = new Array(); this.components = new Array(); } } exports.DeclarationDescriptor = DeclarationDescriptor; class ComponentDescriptor { constructor(identifier) { this.identifier = identifier; this.offers = new Array(); this.requires = new Array(); this.declarations = new DeclarationDescriptor(); this.implementations = new Array(); this.begin = new CodeBlockDescriptor(); this.activity = new CodeBlockDescriptor(); this.finally = new CodeBlockDescriptor(); } } exports.ComponentDescriptor = ComponentDescriptor; class ProcedureDescriptor { constructor(identifier, returnType) { this.identifier = identifier; this.returnType = returnType; this.parameters = new Array(); this.declarations = new DeclarationDescriptor(); this.begin = new CodeBlockDescriptor(); } } exports.ProcedureDescriptor = ProcedureDescriptor; class ImplementationDescriptor { constructor(reference) { this.reference = reference; this.declarations = new DeclarationDescriptor(); this.begin = new CodeBlockDescriptor(); } } exports.ImplementationDescriptor = ImplementationDescriptor; class VariableDescriptor { constructor(identifier, type, mutable) { this.identifier = identifier; this.type = type; this.mutable = mutable; this.indexTypes = new Array(); } } exports.VariableDescriptor = VariableDescriptor; class CodeBlockDescriptor { constructor() { this.instructions = new Array(); } } exports.CodeBlockDescriptor = CodeBlockDescriptor; class InterfaceDescriptor { constructor(identifier) { this.identifier = identifier; this.protocols = new Array(); } } exports.InterfaceDescriptor = InterfaceDescriptor; class ProtocolDescriptor { constructor(type) { this.type = type; this.messages = new Array(); } } exports.ProtocolDescriptor = ProtocolDescriptor; class MessageDescriptor { constructor(identifier) { this.identifier = identifier; this.data = new Array(); } } exports.MessageDescriptor = MessageDescriptor; class JumpDescriptor { constructor(offset) { this.offset = offset; } } exports.JumpDescriptor = JumpDescriptor; class SystemCallDescriptor { constructor(systemCall, ...args) { this.systemCall = systemCall; this.arguments = new Array(...args); } } exports.SystemCallDescriptor = SystemCallDescriptor; //# sourceMappingURL=descriptor.js.map