@bscotch/gml-parser
Version:
A parser for GML (GameMaker Language) files for programmatic manipulation and analysis of GameMaker projects.
54 lines • 2.09 kB
TypeScript
import { Range, Reference } from './project.location.js';
import { Flags } from './signifiers.flags.js';
import { Type, TypeStore } from './types.js';
import { PrimitiveName } from './types.primitives.js';
export declare class Signifier extends Flags {
readonly name: string;
readonly $tag = "Sym";
description: string | undefined;
type: TypeStore;
/** For function params, the index of this param */
idx: number | undefined;
/** The Type containing this member */
readonly parent: Type;
/**
* If this is a native entity (built into GameMaker),
* this is set to the name of the module it came from.
*/
protected _native?: string;
/**
* If `true`, then this definitely exists but may not have a place where it
* is declared. E.g. the `global` variable. In that case this would be set to
* `true`. Otherwise `undefined` is interpreted to mean that this thing
* does not have a definite declaration.
*/
protected _def: Range | {
file?: undefined;
} | undefined;
refs: Set<Reference>;
constructor(parent: Type, name: string, type?: Type | Type[]);
get isRenameable(): boolean;
/**
* Create a new Signifier instance with the same properties as this one,
* except for its refs. Note that it is a shallow copy!
*/
copy(): this;
addRef(location: Range, isDef?: boolean): Reference;
unsetDef(): void;
get def(): Range | {
file?: undefined;
} | undefined;
set def(location: Range | {
file?: undefined;
});
definedAt(location: Range): this;
get native(): string | undefined;
set native(nativeModule: string | undefined);
describe(description: string | undefined): this;
setType(newType: Type | TypeStore | (TypeStore | Type)[]): this;
/** @deprecated Types should be set in one go instead of added piecemeal */
addType(newType: Type | Type[]): this;
get isTyped(): boolean;
getTypeByKind<T extends PrimitiveName>(kind: T): Type<T> | undefined;
}
//# sourceMappingURL=signifiers.d.ts.map