yarn-spinner-loader/src/core.ts

69 lines
1.2 KiB
TypeScript
Raw Normal View History

2026-04-14 16:42:10 +08:00
/**
* Yarn Spinner Loader - Core API
*
* Pure functions and types for working with Yarn Spinner.
* This module does NOT depend on Node.js modules.
*/
// Parser
export { parseYarn, ParseError } from './yarn-spinner/parse/parser';
2026-04-14 16:42:10 +08:00
// Compiler
export { compile, type CompileOptions } from './yarn-spinner/compile/compiler';
// Runner
export { YarnRunner, type RunnerOptions } from './yarn-spinner/runtime/runner';
// AST types
export type {
Position,
NodeHeaderMap,
YarnDocument,
EnumDefinition,
YarnNode,
Statement,
Line,
Command,
Jump,
Detour,
Return,
OptionGroup,
Option,
IfBlock,
OnceBlock,
EnumBlock,
} from './yarn-spinner/model/ast';
// IR types
2026-04-14 16:42:10 +08:00
export type {
IRProgram,
IRNode,
IRNodeGroup,
IRInstruction,
} from './yarn-spinner/compile/ir';
// Runtime types
export type {
2026-04-14 16:42:10 +08:00
TextResult,
OptionsResult,
CommandResult,
RuntimeResult,
} from './yarn-spinner/runtime/results';
// Markup types
export type {
MarkupValue,
MarkupWrapperType,
MarkupWrapper,
MarkupSegment,
MarkupParseResult,
} from './yarn-spinner/markup/types';
// Loader types
export type {
LoadOptions,
LoadResult,
YarnProject,
SchemaValidationError,
2026-04-14 16:42:10 +08:00
} from './types';