@composita/symbols
Version: 
Composita language symbols.
73 lines • 2.57 kB
JavaScript
import { NamedScopeSymbol } from './scope-symbols';
var TypeSymbolTag;
(function (TypeSymbolTag) {
    TypeSymbolTag[TypeSymbolTag["Tag"] = 0] = "Tag";
})(TypeSymbolTag || (TypeSymbolTag = {}));
export class TypeSymbol extends NamedScopeSymbol {
    constructor() {
        super(...arguments);
        this._typeSymbolTag = TypeSymbolTag.Tag;
    }
}
export class ConstantSymbol {
    constructor(identifier, type) {
        this.identifier = identifier;
        this.type = type;
    }
}
export class ProcedureSymbol extends TypeSymbol {
    constructor(scope, identifier, parameters, returnType) {
        super(scope, identifier);
        this.parameters = parameters;
        this.returnType = returnType;
    }
}
var BuiltInTypeSymbolTag;
(function (BuiltInTypeSymbolTag) {
    BuiltInTypeSymbolTag[BuiltInTypeSymbolTag["Tag"] = 0] = "Tag";
})(BuiltInTypeSymbolTag || (BuiltInTypeSymbolTag = {}));
export class BuiltInTypeSymbol extends TypeSymbol {
    constructor() {
        super(...arguments);
        this._builtInTypeSymbol = BuiltInTypeSymbolTag.Tag;
    }
}
var InterfaceSymbolTag;
(function (InterfaceSymbolTag) {
    InterfaceSymbolTag[InterfaceSymbolTag["Tag"] = 0] = "Tag";
})(InterfaceSymbolTag || (InterfaceSymbolTag = {}));
export class InterfaceSymbol extends TypeSymbol {
    constructor() {
        super(...arguments);
        this._interfaceSymbolTag = InterfaceSymbolTag.Tag;
    }
}
var ComponentSymbolTag;
(function (ComponentSymbolTag) {
    ComponentSymbolTag[ComponentSymbolTag["Tag"] = 0] = "Tag";
})(ComponentSymbolTag || (ComponentSymbolTag = {}));
export class ComponentSymbol extends TypeSymbol {
    constructor(scope, identifier, genericType, isEntryPoint) {
        super(scope, identifier);
        this.genericType = genericType;
        this.isEntryPoint = isEntryPoint;
        this._componentSymbolTag = ComponentSymbolTag.Tag;
    }
}
var GenericComponentSymbolTag;
(function (GenericComponentSymbolTag) {
    GenericComponentSymbolTag[GenericComponentSymbolTag["Tag"] = 0] = "Tag";
})(GenericComponentSymbolTag || (GenericComponentSymbolTag = {}));
export class GenericComponentSymbol extends ComponentSymbol {
    constructor(scope, genericType) {
        super(scope, '@@@__ANY__GENERIC_COMPONENT__@@@', genericType, false);
        this._genericComponentSymbolTag = GenericComponentSymbolTag.Tag;
    }
}
export class MessageSymbol extends TypeSymbol {
    constructor(scope, identifier, parameters) {
        super(scope, identifier);
        this.parameters = parameters;
    }
}
//# sourceMappingURL=type-symbols.js.map