@unified-latex/unified-latex-util-pegjs
Advanced tools
Comparing version 1.6.1 to 1.7.0
@@ -1,19 +0,47 @@ | ||
export * from "./libs/decorate-array-for-pegjs"; | ||
export * from "./libs/split-strings"; | ||
export * from "./libs/pegjs-parsers.js"; | ||
import * as Ast from '@unified-latex/unified-latex-types'; | ||
export declare const AlignEnvironmentPegParser: PegParser; | ||
export declare const ArgSpecPegParser: PegParser; | ||
/** | ||
* ## What is this? | ||
* Pegjs operates on strings. However, strings and arrays are very similar! | ||
* This function adds `charAt`, `charCodeAt`, and `substring` methods to | ||
* `array` so that `array` can then be fed to a Pegjs generated parser. | ||
* | ||
* Pegjs grammars to help parse strings into a `unified-latex` Abstract Syntax Tree (AST). Note, | ||
* because of the dynamic nature of LaTeX, to get a full AST with arguments attached to macros, etc., | ||
* the tree is parsed multiple times. | ||
* | ||
* Also included are functions to decorate a `Ast.Node[]` array so that Pegjs can process it as if it were | ||
* a string. This allows for complex second-pass parsing. | ||
* | ||
* ## When should I use this? | ||
* | ||
* If you are building libraries to parse specific LaTeX syntax (e.g., to parse `tabular` environments or | ||
* `systeme` environments, etc.). | ||
* @param {[object]} array | ||
* @returns {[object]} | ||
*/ | ||
//# sourceMappingURL=index.d.ts.map | ||
export declare function decorateArrayForPegjs(array: any[]): StringlikeArray; | ||
export declare const GluePegParser: PegParser; | ||
export declare const LatexPegParser: PegParser; | ||
export declare const LigaturesPegParser: PegParser; | ||
export declare const MacroSubstitutionPegParser: PegParser; | ||
declare type PegParser = { | ||
parse: (input: string | unknown[], options?: unknown) => any; | ||
SyntaxError: (message: string, expected: string, found: unknown, location: unknown) => unknown; | ||
}; | ||
export declare const PgfkeysPegParser: PegParser; | ||
/** | ||
* Splits all multi-character strings into strings that are all single characters. | ||
*/ | ||
export declare function splitStringsIntoSingleChars(nodes: Ast.Node[]): Ast.Node[]; | ||
declare type StringlikeArray = any[] & string; | ||
export declare const SystemePegParser: PegParser; | ||
export declare const TabularPegParser: PegParser; | ||
export declare const TikzPegParser: PegParser; | ||
export declare const XColorPegParser: PegParser; | ||
export { } |
{ | ||
"name": "@unified-latex/unified-latex-util-pegjs", | ||
"version": "1.6.1", | ||
"version": "1.7.0", | ||
"description": "PEGjs grammars and tools for constructing unified-latex ASTs", | ||
@@ -8,4 +8,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"@unified-latex/unified-latex-types": "^1.6.1", | ||
"@unified-latex/unified-latex-util-match": "^1.6.1" | ||
"@unified-latex/unified-latex-types": "^1.7.0", | ||
"@unified-latex/unified-latex-util-match": "^1.7.0" | ||
}, | ||
@@ -12,0 +12,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2640834
7
32803