MCPcopy Index your code
hub / github.com/gTile/gTile / parse

Method parse

src/util/parser.ts:352–368  ·  view source on GitHub ↗

* Parses the input provided during instance creation. * * @returns The parsed GridSpec or `null` when a parser error occured.

()

Source from the content-addressed store, hash-verified

350 * @returns The parsed {@link GridSpec} or `null` when a parser error occured.
351 */
352 parse(): GridSpec | null {
353 try {
354 this.token = this.scanner.scan();
355
356 return this.#parseGridSpec();
357 } catch (e) {
358 if (e instanceof LexicalError || e instanceof ParseError) {
359 console.warn(
360 `Failed to parse GridSpec. Input: "${this.scanner.input}".`,
361 `Error: ${e.message}`,
362 );
363 return null;
364 }
365
366 throw e;
367 }
368 }
369
370 #parseGridSpec(): GridSpec {
371 switch (this.token.kind) {

Callers 9

testSemanticEquivalenceFunction · 0.45
testSyntacticErrorFunction · 0.45
compareSnapshotFunction · 0.45
constructorMethod · 0.45
#getResizePresetMethod · 0.45
#onPresetsChangedMethod · 0.45
AutoTileLayoutsFunction · 0.45

Calls 2

#parseGridSpecMethod · 0.95
scanMethod · 0.80

Tested by

no test coverage detected