@notatki/parser 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/parser.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ import type { ModelNode, NoteNode, TemplateItem } from "./nodes.js";
2
+ import type { GrammarSource } from "./parser$.js";
3
+
4
+ export type { GrammarSource, GrammarSourceObject, Location, LocationRange } from "./parser$.js";
5
+ export { SyntaxError } from "./parser$.js";
6
+
7
+ export function parseNoteList(input: string, source?: GrammarSource): NoteNode[];
8
+
9
+ export function parseModelList(input: string, source?: GrammarSource): ModelNode[];
10
+
11
+ export function parseTemplate(input: string, source?: GrammarSource): TemplateItem[];
package/parser.js ADDED
@@ -0,0 +1,15 @@
1
+ import { parse, SyntaxError } from "./parser$.js";
2
+
3
+ function parseNoteList(input, grammarSource) {
4
+ return parse(input, { grammarSource, startRule: "NoteList" });
5
+ }
6
+
7
+ function parseModelList(input, grammarSource) {
8
+ return parse(input, { grammarSource, startRule: "ModelList" });
9
+ }
10
+
11
+ function parseTemplate(input, grammarSource) {
12
+ return parse(input, { grammarSource, startRule: "Template" });
13
+ }
14
+
15
+ export { parseModelList, parseNoteList, parseTemplate, SyntaxError };