Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 1x 1x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 1x 1x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 1x 1x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x | /*
* This file is released under the MIT license.
* Copyright (c) 2023, Mike Lischke
*
* See LICENSE file for more info.
*/
import { BaseSymbol } from "./BaseSymbol";
/** Visibility (aka. accessibility) of a symbol member. */
export enum MemberVisibility {
/** Not specified, default depends on the language and type. */
Unknown,
/** Used in Swift, member can be accessed outside of the defining module and extended. */
Open,
/** Like Open, but in Swift such a type cannot be extended. */
Public,
/** Member is only accessible in the defining class and any derived class. */
Protected,
/** Member can only be accessed from the defining class. */
Private,
/**
* Used in Swift and Java, member can be accessed from everywhere in a defining module, not outside however.
* Also known as package private.
*/
FilePrivate,
/** Custom enum for special usage. */
Library,
}
/** The modifier of a symbol member. */
export enum Modifier {
Static,
Final,
Sealed,
Abstract,
Deprecated,
Virtual,
Const,
Overwritten,
}
/** Rough categorization of a type. */
export enum TypeKind {
Unknown,
Integer,
Float,
Number,
String,
Char,
Boolean,
Class,
Interface,
Array,
Map,
Enum,
Alias,
}
/** Describes a reference to a type. */
export enum ReferenceKind {
Irrelevant,
/** Default for most languages for dynamically allocated memory ("Type*" in C++). */
Pointer,
/** "Type&" in C++, all non-primitive types in Java/Javascript/Typescript etc. */
Reference,
/** "Type" as such and default for all value types. */
Instance,
}
/** The root type interface. Used for typed symbols and type aliases. */
export interface Type {
name: string;
/**
* The super type of this type or empty if this is a fundamental type.
* Also used as the target type for type aliases.
*/
baseTypes: Type[];
kind: TypeKind;
reference: ReferenceKind;
}
export interface SymbolTableOptions {
allowDuplicateSymbols?: boolean;
}
export type SymbolConstructor<T extends BaseSymbol> = new (...args: unknown[]) => T;
|