credl-parser-evaluator
Version:
TypeScript-based CREDL Parser and Evaluator that processes CREDL files and outputs complete Intermediate Representations
85 lines • 2.57 kB
TypeScript
/**
* CREDL YAML Parser
*
* Parses CREDL YAML files into strongly typed TypeScript objects with comprehensive
* error handling and validation. Supports parsing from files, strings, and streams.
*/
import { Readable } from 'stream';
import { CREDLFile, ParseResult } from '../types/CREDLTypes';
export interface ParseOptions {
strict?: boolean;
filename?: string;
validateStructure?: boolean;
}
export declare class CREDLParser {
private static readonly DEFAULT_OPTIONS;
/**
* Parse a CREDL file from the filesystem
*/
static parseFile(filePath: string, options?: ParseOptions): Promise<ParseResult<CREDLFile>>;
/**
* Parse a CREDL file from a readable stream
*/
static parseStream(stream: Readable, options?: ParseOptions): Promise<ParseResult<CREDLFile>>;
/**
* Parse a CREDL YAML string
*/
static parseString(content: string, options?: ParseOptions): ParseResult<CREDLFile>;
/**
* Parse raw JavaScript object into typed CREDL structure
*/
private static parseRawData;
/**
* Parse metadata block with standardized validation messages
*/
private static parseMetadata;
/**
* Parse assets block with enhanced error handling and recovery
*/
private static parseAssets;
/**
* Parse spaces block with enhanced error handling and recovery
*/
private static parseSpaces;
/**
* Parse assumptions block with standardized validation messages
*/
private static parseAssumptions;
/**
* Parse models block with standardized validation messages
*/
private static parseModels;
/**
* Parse simulation block with standardized validation messages
*/
private static parseSimulation;
/**
* Parse outputs block with standardized validation messages
*/
private static parseOutput;
/**
* Parse extensions block (optional)
*/
private static parseExtensions;
/**
* Parse presets block (optional)
*/
private static parsePresets;
/**
* Parse templates block (optional)
*/
private static parseTemplates;
/**
* Parse use_templates block (optional)
*/
private static parseUseTemplates;
/**
* Parse scenarios block (optional first-class block per Behavioral Specification 8.1)
*/
private static parseScenarios;
/**
* Parse waterfall block (optional first-class block per Behavioral Specification 8.1)
*/
private static parseWaterfall;
}
//# sourceMappingURL=CREDLParser.d.ts.map