UNPKG

@bscotch/gml-parser

Version:

A parser for GML (GameMaker Language) files for programmatic manipulation and analysis of GameMaker projects.

533 lines 20.2 kB
import { z } from 'zod'; export type GmlSpec = z.output<typeof gmlSpecSchema>; export type GmlSpecFunction = GmlSpec['functions'][number]; export type GmlSpecVariable = GmlSpec['variables'][number]; export type GmlSpecConstant = GmlSpec['constants'][number]; export type GmlSpecEntry = GmlSpecFunction | GmlSpecVariable | GmlSpecConstant; export declare const gmlSpecSchema: z.ZodPipe<z.ZodObject<{ GameMakerLanguageSpec: z.ZodPipe<z.ZodObject<{ $: z.ZodObject<{ RuntimeVersion: z.ZodString; Module: z.ZodDefault<z.ZodString>; }, z.core.$strip>; Functions: z.ZodOptional<z.ZodArray<z.ZodObject<{ Function: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{ $: z.ZodObject<{ Name: z.ZodString; Deprecated: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"true">, z.ZodLiteral<"false">]>, z.ZodTransform<boolean, "true" | "false">>; ReturnType: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>; Pure: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"true">, z.ZodLiteral<"false">]>, z.ZodTransform<boolean, "true" | "false">>; Locale: z.ZodOptional<z.ZodEnum<{ GB: "GB"; US: "US"; }>>; FeatureFlag: z.ZodOptional<z.ZodString>; }, z.core.$strict>; Description: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>>>; Parameter: z.ZodDefault<z.ZodArray<z.ZodObject<{ _: z.ZodOptional<z.ZodString>; $: z.ZodObject<{ Name: z.ZodString; Type: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>; Optional: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"true">, z.ZodLiteral<"false">]>, z.ZodTransform<boolean, "true" | "false">>; Coerce: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"true">, z.ZodLiteral<"false">]>, z.ZodTransform<boolean, "true" | "false">>>; }, z.core.$strict>; }, z.core.$strict>>>; }, z.core.$strict>, z.ZodTransform<{ module: string; name: string; description: string | undefined; deprecated: boolean; pure: boolean; returnType: string; featureFlag: string | undefined; locale: "GB" | "US" | undefined; parameters: { name: string; description: string | undefined; type: string; optional: boolean; coerce: boolean | undefined; }[]; }, { $: { Name: string; Deprecated: boolean; ReturnType: string; Pure: boolean; Locale?: "GB" | "US" | undefined; FeatureFlag?: string | undefined; }; Parameter: { $: { Name: string; Type: string; Optional: boolean; Coerce?: boolean | undefined; }; _?: string | undefined; }[]; Description?: string[] | undefined; }>>>>; }, z.core.$strip>>>; Variables: z.ZodOptional<z.ZodArray<z.ZodObject<{ Variable: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{ _: z.ZodOptional<z.ZodString>; $: z.ZodObject<{ Name: z.ZodString; Type: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>; Deprecated: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"true">, z.ZodLiteral<"false">]>, z.ZodTransform<boolean, "true" | "false">>; Get: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"true">, z.ZodLiteral<"false">]>, z.ZodTransform<boolean, "true" | "false">>; Set: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"true">, z.ZodLiteral<"false">]>, z.ZodTransform<boolean, "true" | "false">>; Instance: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"true">, z.ZodLiteral<"false">]>, z.ZodTransform<boolean, "true" | "false">>; FeatureFlag: z.ZodOptional<z.ZodString>; Locale: z.ZodOptional<z.ZodEnum<{ GB: "GB"; US: "US"; }>>; }, z.core.$strict>; }, z.core.$strict>, z.ZodTransform<{ module: string; name: string; description: string | undefined; type: string; deprecated: boolean; readable: boolean; writable: boolean; instance: boolean; featureFlag: string | undefined; locale: "GB" | "US" | undefined; }, { $: { Name: string; Type: string; Deprecated: boolean; Get: boolean; Set: boolean; Instance: boolean; FeatureFlag?: string | undefined; Locale?: "GB" | "US" | undefined; }; _?: string | undefined; }>>>>; }, z.core.$strip>>>; Constants: z.ZodOptional<z.ZodArray<z.ZodObject<{ Constant: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{ _: z.ZodOptional<z.ZodString>; $: z.ZodObject<{ Name: z.ZodString; Class: z.ZodOptional<z.ZodString>; Type: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>; Deprecated: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"true">, z.ZodLiteral<"false">]>, z.ZodTransform<boolean, "true" | "false">>>; FeatureFlag: z.ZodOptional<z.ZodString>; Locale: z.ZodOptional<z.ZodEnum<{ GB: "GB"; US: "US"; }>>; }, z.core.$strict>; }, z.core.$strict>, z.ZodTransform<{ module: string; name: string; description: string | undefined; class: string | undefined; type: string; deprecated: boolean | undefined; featureFlag: string | undefined; locale: "GB" | "US" | undefined; }, { $: { Name: string; Type: string; Class?: string | undefined; Deprecated?: boolean | undefined; FeatureFlag?: string | undefined; Locale?: "GB" | "US" | undefined; }; _?: string | undefined; }>>>>; }, z.core.$strip>>>; Structures: z.ZodOptional<z.ZodArray<z.ZodObject<{ Structure: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{ $: z.ZodObject<{ Name: z.ZodString; FeatureFlag: z.ZodOptional<z.ZodString>; }, z.core.$strict>; Field: z.ZodArray<z.ZodPipe<z.ZodObject<{ _: z.ZodOptional<z.ZodString>; $: z.ZodObject<{ Name: z.ZodString; Type: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>; Get: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"true">, z.ZodLiteral<"false">]>, z.ZodTransform<boolean, "true" | "false">>; Set: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"true">, z.ZodLiteral<"false">]>, z.ZodTransform<boolean, "true" | "false">>; Locale: z.ZodOptional<z.ZodEnum<{ GB: "GB"; US: "US"; }>>; }, z.core.$strict>; }, z.core.$strict>, z.ZodTransform<{ name: string; description: string | undefined; type: string; readable: boolean; writable: boolean; locale: "GB" | "US" | undefined; }, { $: { Name: string; Type: string; Get: boolean; Set: boolean; Locale?: "GB" | "US" | undefined; }; _?: string | undefined; }>>>; }, z.core.$strict>, z.ZodTransform<{ module: string; name: string; featureFlag: string | undefined; properties: { name: string; description: string | undefined; type: string; readable: boolean; writable: boolean; locale: "GB" | "US" | undefined; }[]; }, { $: { Name: string; FeatureFlag?: string | undefined; }; Field: { name: string; description: string | undefined; type: string; readable: boolean; writable: boolean; locale: "GB" | "US" | undefined; }[]; }>>>>; }, z.core.$strip>>>; Enumerations: z.ZodOptional<z.ZodArray<z.ZodObject<{ Enumeration: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{ $: z.ZodObject<{ Name: z.ZodString; }, z.core.$strict>; Member: z.ZodArray<z.ZodPipe<z.ZodObject<{ _: z.ZodOptional<z.ZodString>; $: z.ZodObject<{ Name: z.ZodString; Value: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>; Deprecated: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"true">, z.ZodLiteral<"false">]>, z.ZodTransform<boolean, "true" | "false">>; }, z.core.$strict>; }, z.core.$strict>, z.ZodTransform<{ name: string; description: string | undefined; value: number; deprecated: boolean; }, { $: { Name: string; Value: number; Deprecated: boolean; }; _?: string | undefined; }>>>; }, z.core.$strict>, z.ZodTransform<{ module: string; name: string; members: { name: string; description: string | undefined; value: number; deprecated: boolean; }[]; }, { $: { Name: string; }; Member: { name: string; description: string | undefined; value: number; deprecated: boolean; }[]; }>>>>; }, z.core.$strip>>>; }, z.core.$strict>, z.ZodTransform<{ runtime: string; module: string; functions: { module: string; name: string; description: string | undefined; deprecated: boolean; pure: boolean; returnType: string; featureFlag: string | undefined; locale: "GB" | "US" | undefined; parameters: { name: string; description: string | undefined; type: string; optional: boolean; coerce: boolean | undefined; }[]; }[]; variables: { module: string; name: string; description: string | undefined; type: string; deprecated: boolean; readable: boolean; writable: boolean; instance: boolean; featureFlag: string | undefined; locale: "GB" | "US" | undefined; }[]; constants: { module: string; name: string; description: string | undefined; class: string | undefined; type: string; deprecated: boolean | undefined; featureFlag: string | undefined; locale: "GB" | "US" | undefined; }[]; structures: { module: string; name: string; featureFlag: string | undefined; properties: { name: string; description: string | undefined; type: string; readable: boolean; writable: boolean; locale: "GB" | "US" | undefined; }[]; }[]; enumerations: { module: string; name: string; members: { name: string; description: string | undefined; value: number; deprecated: boolean; }[]; }[]; }, { $: { RuntimeVersion: string; Module: string; }; Functions?: { Function: { module: string; name: string; description: string | undefined; deprecated: boolean; pure: boolean; returnType: string; featureFlag: string | undefined; locale: "GB" | "US" | undefined; parameters: { name: string; description: string | undefined; type: string; optional: boolean; coerce: boolean | undefined; }[]; }[]; }[] | undefined; Variables?: { Variable: { module: string; name: string; description: string | undefined; type: string; deprecated: boolean; readable: boolean; writable: boolean; instance: boolean; featureFlag: string | undefined; locale: "GB" | "US" | undefined; }[]; }[] | undefined; Constants?: { Constant: { module: string; name: string; description: string | undefined; class: string | undefined; type: string; deprecated: boolean | undefined; featureFlag: string | undefined; locale: "GB" | "US" | undefined; }[]; }[] | undefined; Structures?: { Structure: { module: string; name: string; featureFlag: string | undefined; properties: { name: string; description: string | undefined; type: string; readable: boolean; writable: boolean; locale: "GB" | "US" | undefined; }[]; }[]; }[] | undefined; Enumerations?: { Enumeration: { module: string; name: string; members: { name: string; description: string | undefined; value: number; deprecated: boolean; }[]; }[]; }[] | undefined; }>>; }, z.core.$strict>, z.ZodTransform<{ runtime: string; module: string; functions: { module: string; name: string; description: string | undefined; deprecated: boolean; pure: boolean; returnType: string; featureFlag: string | undefined; locale: "GB" | "US" | undefined; parameters: { name: string; description: string | undefined; type: string; optional: boolean; coerce: boolean | undefined; }[]; }[]; variables: { module: string; name: string; description: string | undefined; type: string; deprecated: boolean; readable: boolean; writable: boolean; instance: boolean; featureFlag: string | undefined; locale: "GB" | "US" | undefined; }[]; constants: { module: string; name: string; description: string | undefined; class: string | undefined; type: string; deprecated: boolean | undefined; featureFlag: string | undefined; locale: "GB" | "US" | undefined; }[]; structures: { module: string; name: string; featureFlag: string | undefined; properties: { name: string; description: string | undefined; type: string; readable: boolean; writable: boolean; locale: "GB" | "US" | undefined; }[]; }[]; enumerations: { module: string; name: string; members: { name: string; description: string | undefined; value: number; deprecated: boolean; }[]; }[]; }, { GameMakerLanguageSpec: { runtime: string; module: string; functions: { module: string; name: string; description: string | undefined; deprecated: boolean; pure: boolean; returnType: string; featureFlag: string | undefined; locale: "GB" | "US" | undefined; parameters: { name: string; description: string | undefined; type: string; optional: boolean; coerce: boolean | undefined; }[]; }[]; variables: { module: string; name: string; description: string | undefined; type: string; deprecated: boolean; readable: boolean; writable: boolean; instance: boolean; featureFlag: string | undefined; locale: "GB" | "US" | undefined; }[]; constants: { module: string; name: string; description: string | undefined; class: string | undefined; type: string; deprecated: boolean | undefined; featureFlag: string | undefined; locale: "GB" | "US" | undefined; }[]; structures: { module: string; name: string; featureFlag: string | undefined; properties: { name: string; description: string | undefined; type: string; readable: boolean; writable: boolean; locale: "GB" | "US" | undefined; }[]; }[]; enumerations: { module: string; name: string; members: { name: string; description: string | undefined; value: number; deprecated: boolean; }[]; }[]; }; }>>; //# sourceMappingURL=project.spec.d.ts.map