# configuration/strings/grammar.strings.ts

> 37 lines of code and 16 definitions.

Tree: Code Parse
Language: typescript
Layer: product
Canonical: https://banes-lab.com/anatomy/code-parse#file-code-parse-configuration-strings-grammar-strings-ts
Source text: https://banes-lab.com/source/code-parse/configuration/strings/grammar.strings.ts.txt

Listed in [configuration/strings](https://banes-lab.com/api/source/code-parse/configuration/strings.md), before [configuration/strings/syntax.strings.ts](https://banes-lab.com/source/code-parse/configuration/strings/syntax.strings.ts.md).

## Definitions

- `noteOf` (lexical_declaration, line 18, exported)
- `noParserSource` (lexical_declaration, line 14, exported)
- `builtLine` (lexical_declaration, line 22, exported)
- `wasmFailedLine` (lexical_declaration, line 26, exported)
- `fetchFailedLine` (lexical_declaration, line 30, exported)
- `wroteLine` (lexical_declaration, line 34, exported)
- `builtSummary` (lexical_declaration, line 38, exported)
- `noteLine` (lexical_declaration, line 42, exported)
- `fetchFailedNote` (lexical_declaration, line 46, exported)
- `BUILD_COMMAND` (lexical_declaration, line 1, exported)
- `BUILD_SUMMARY` (lexical_declaration, line 3, exported)
- `NO_TARBALL` (lexical_declaration, line 6, exported)
- `UNKNOWN_FAILURE` (lexical_declaration, line 8, exported)
- `WASM_UNBUILT_PREFIX` (lexical_declaration, line 10, exported)
- `SKIPPED_PREFIX` (lexical_declaration, line 12, exported)
- `buildFailed` (lexical_declaration, line 50, exported)

## Contained in

- [configuration/strings](https://banes-lab.com/anatomy/code-parse/folder-code-parse-configuration-strings.md)

## Used by

- [core/coordinators/grammar.coordinator.ts](https://banes-lab.com/source/code-parse/core/coordinators/grammar.coordinator.ts.md)
- [core/reporters/grammar.reporter.ts](https://banes-lab.com/source/code-parse/core/reporters/grammar.reporter.ts.md)

## Linked from

- [core/coordinators](https://banes-lab.com/anatomy/code-parse/folder-code-parse-core-coordinators.md)
- [core/reporters](https://banes-lab.com/anatomy/code-parse/folder-code-parse-core-reporters.md)

## Source

```typescript
export const BUILD_COMMAND = "npm run build:grammars -w @govlab/code-parse --";

export const BUILD_SUMMARY =
    "Fetch every declared tree-sitter grammar, build each missing grammar to WebAssembly, and write the language extension map.";

export const NO_TARBALL = "npm pack produced no tarball";

export const UNKNOWN_FAILURE = "unknown";

export const WASM_UNBUILT_PREFIX = "wasm-unbuilt (extensions kept)";

export const SKIPPED_PREFIX = "skipped";

export const noParserSource = function noParserSource(subdir?: string): string {
    return `no src/parser.c at ${subdir ?? "<root>"}`;
};

export const noteOf = function noteOf(lang: string, reason: string): string {
    return `${lang}: ${reason}`;
};

export const builtLine = function builtLine(lang: string, fileTypes: readonly string[]): string {
    return `ok ${lang} (${fileTypes.join(",")})\n`;
};

export const wasmFailedLine = function wasmFailedLine(lang: string, reason: string): string {
    return `WASM BUILD FAILED ${lang}: ${reason}\n`;
};

export const fetchFailedLine = function fetchFailedLine(lang: string, reason: string): string {
    return `FETCH FAILED ${lang}: ${reason}\n`;
};

export const wroteLine = function wroteLine(count: number, target: string): string {
    return `\nwrote ${String(count)} language extension set(s) to ${target}\n`;
};

export const builtSummary = function builtSummary(built: readonly string[]): string {
    return `\nbuilt ${String(built.length)} grammar(s): ${built.join(" ")}\n`;
};

export const noteLine = function noteLine(prefix: string, note: string): string {
    return `${prefix} ${note}\n`;
};

export const fetchFailedNote = function fetchFailedNote(note: string): string {
    return `fetch failed ${note}\n`;
};

export const buildFailed = function buildFailed(reason: string): string {
    return `build-grammars failed: ${reason}\n`;
};
```
