UNPKG

@bscotch/stitch

Version:

Stitch: The GameMaker Studio 2 Asset Pipeline Development Kit.

51 lines 2.06 kB
import type { Gms2ResourceBase } from '../components/resources/Gms2ResourceBase.js'; export declare class GmlTokenLocation<Resource extends Gms2ResourceBase = Gms2ResourceBase> { readonly position: number; readonly line: number; readonly column: number; readonly subresource?: string | undefined; private _resource?; constructor(position: number, line: number, column: number, subresource?: string | undefined); set resource(resource: Resource | undefined); get resource(): Resource | undefined; get filename(): string; get filepathRelative(): string; get filepathAbsolute(): string; /** * Whether this token exactly matches another token * by location, including associated resources. * Will return false if either token does not have an associated resource. */ isSameLocation(otherLocation: GmlTokenLocation): boolean | undefined; /** * Whether or not the token's position data (position, column, line) * are the same as another token *ignoring whether they come from the same resource*. * This is useful for tokens created externally that do not have an associated * Gms2Resource. */ isSamePosition(otherLocation: GmlTokenLocation): boolean; isFromSameResource(otherLocation: GmlTokenLocation): boolean | undefined; toJSON(): { position: number; line: number; column: number; resource: Resource | undefined; subresource: string | undefined; }; static createFromMatch(source: string, match: RegExpExecArray, options?: { offsetPosition?: number; sublocation?: string; }): GmlTokenLocation<Gms2ResourceBase<{ name: string; resourceType: string; parent: { path: string; name: string; }; resourceVersion: string; "%Name"?: string | undefined; ConfigValues?: Record<string, Record<string, string>> | undefined; tags?: string[] | undefined; }>>; } //# sourceMappingURL=GmlTokenLocation.d.ts.map