parsergen-starter
Version:
A complete parser generator starter with PEG.js, optional Moo lexer, and VS Code integration
49 lines (45 loc) • 1.04 kB
text/typescript
// utils/index.ts
// ==========================
// 📦 Utility Exports
// ==========================
export {
formatError,
formatLocation,
formatErrorWithColors,
formatMultipleErrors,
formatCompilationError,
formatAnyError,
formatAnyErrors,
wrapCompilationError,
formatErrorWithSuggestions,
formatSuccessMessage,
formatWarningMessage,
formatInfoMessage,
getErrorSuggestions,
getErrorContext,
formatDebugError,
isGrammarError,
toParseError,
} from './format.ts';
export {
createASTNode,
traverseAST,
traversePreOrder,
traversePostOrder,
findNodesByType,
findNode,
transformAST,
serializeAST,
printAST,
getASTStats
} from './ast.ts';
export {
highlightSnippet,
highlightSnippetAdvanced,
highlightMultipleLocations,
createSnippet,
getLocationFromOffset,
getOffsetFromLocation
} from './highlight.ts';
export type { ASTNode, ASTVisitor } from './ast.ts';
export type { Location, Position, ErrorFormatter } from './types.ts';