{
  "definitions": [
    {
      "callable": true,
      "callees": [
        {
          "file": "core/converters/syntax.converter.ts",
          "name": "ensureInit",
          "source": {
            "href": "https://banes-lab.com/anatomy/code-parse#file-code-parse-core-converters-syntax-converter-ts",
            "json": "https://banes-lab.com/json/source/code-parse/core/converters/syntax.converter.ts",
            "label": "core/converters/syntax.converter.ts",
            "markdown": "https://banes-lab.com/source/code-parse/core/converters/syntax.converter.ts.md",
            "ref": "anatomy:file-code-parse-core-converters-syntax-converter-ts"
          }
        },
        {
          "file": "core/converters/syntax.converter.ts",
          "name": "loadMissing",
          "source": {
            "href": "https://banes-lab.com/anatomy/code-parse#file-code-parse-core-converters-syntax-converter-ts",
            "json": "https://banes-lab.com/json/source/code-parse/core/converters/syntax.converter.ts",
            "label": "core/converters/syntax.converter.ts",
            "markdown": "https://banes-lab.com/source/code-parse/core/converters/syntax.converter.ts.md",
            "ref": "anatomy:file-code-parse-core-converters-syntax-converter-ts"
          }
        }
      ],
      "callers": [
        {
          "file": "core/converters/syntax.converter.ts",
          "name": "parseCode",
          "source": {
            "href": "https://banes-lab.com/anatomy/code-parse#file-code-parse-core-converters-syntax-converter-ts",
            "json": "https://banes-lab.com/json/source/code-parse/core/converters/syntax.converter.ts",
            "label": "core/converters/syntax.converter.ts",
            "markdown": "https://banes-lab.com/source/code-parse/core/converters/syntax.converter.ts.md",
            "ref": "anatomy:file-code-parse-core-converters-syntax-converter-ts"
          }
        }
      ],
      "exported": true,
      "flow": "relay",
      "kind": "lexical_declaration",
      "line": 51,
      "name": "ensureLanguages",
      "signature": "export const ensureLanguages = async function ensureLanguages(languages: Iterable<string>): Promise<void> {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "configuration/strings/syntax.strings.ts",
          "name": "notPreloaded",
          "source": {
            "href": "https://banes-lab.com/anatomy/code-parse#file-code-parse-configuration-strings-syntax-strings-ts",
            "json": "https://banes-lab.com/json/source/code-parse/configuration/strings/syntax.strings.ts",
            "label": "configuration/strings/syntax.strings.ts",
            "markdown": "https://banes-lab.com/source/code-parse/configuration/strings/syntax.strings.ts.md",
            "ref": "anatomy:file-code-parse-configuration-strings-syntax-strings-ts"
          }
        },
        {
          "file": "core/converters/syntax.converter.ts",
          "name": "runParser",
          "source": {
            "href": "https://banes-lab.com/anatomy/code-parse#file-code-parse-core-converters-syntax-converter-ts",
            "json": "https://banes-lab.com/json/source/code-parse/core/converters/syntax.converter.ts",
            "label": "core/converters/syntax.converter.ts",
            "markdown": "https://banes-lab.com/source/code-parse/core/converters/syntax.converter.ts.md",
            "ref": "anatomy:file-code-parse-core-converters-syntax-converter-ts"
          }
        }
      ],
      "callers": [
        {
          "file": "core/converters/syntax.converter.ts",
          "name": "parseCode",
          "source": {
            "href": "https://banes-lab.com/anatomy/code-parse#file-code-parse-core-converters-syntax-converter-ts",
            "json": "https://banes-lab.com/json/source/code-parse/core/converters/syntax.converter.ts",
            "label": "core/converters/syntax.converter.ts",
            "markdown": "https://banes-lab.com/source/code-parse/core/converters/syntax.converter.ts.md",
            "ref": "anatomy:file-code-parse-core-converters-syntax-converter-ts"
          }
        }
      ],
      "exported": true,
      "flow": "relay",
      "kind": "lexical_declaration",
      "line": 95,
      "name": "parseCodeSync",
      "signature": "export const parseCodeSync = function parseCodeSync("
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/converters/syntax.converter.ts",
          "name": "ensureLanguages",
          "source": {
            "href": "https://banes-lab.com/anatomy/code-parse#file-code-parse-core-converters-syntax-converter-ts",
            "json": "https://banes-lab.com/json/source/code-parse/core/converters/syntax.converter.ts",
            "label": "core/converters/syntax.converter.ts",
            "markdown": "https://banes-lab.com/source/code-parse/core/converters/syntax.converter.ts.md",
            "ref": "anatomy:file-code-parse-core-converters-syntax-converter-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 20,
      "name": "ensureInit",
      "signature": "const ensureInit = async function ensureInit(): Promise<void> {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/converters/syntax.converter.ts",
          "name": "ensureLanguages",
          "source": {
            "href": "https://banes-lab.com/anatomy/code-parse#file-code-parse-core-converters-syntax-converter-ts",
            "json": "https://banes-lab.com/json/source/code-parse/core/converters/syntax.converter.ts",
            "label": "core/converters/syntax.converter.ts",
            "markdown": "https://banes-lab.com/source/code-parse/core/converters/syntax.converter.ts.md",
            "ref": "anatomy:file-code-parse-core-converters-syntax-converter-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 40,
      "name": "loadMissing",
      "signature": "const loadMissing = async function loadMissing(wasms: string[]): Promise<void> {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/converters/syntax.converter.ts",
          "name": "parseOnce",
          "source": {
            "href": "https://banes-lab.com/anatomy/code-parse#file-code-parse-core-converters-syntax-converter-ts",
            "json": "https://banes-lab.com/json/source/code-parse/core/converters/syntax.converter.ts",
            "label": "core/converters/syntax.converter.ts",
            "markdown": "https://banes-lab.com/source/code-parse/core/converters/syntax.converter.ts.md",
            "ref": "anatomy:file-code-parse-core-converters-syntax-converter-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 56,
      "name": "adaptTree",
      "signature": "const adaptTree = function adaptTree(tree: Tree | null, sourceLength: number, logger?: ParseLogger): ParseAttempt {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/converters/syntax.converter.ts",
          "name": "parseCodeSync",
          "source": {
            "href": "https://banes-lab.com/anatomy/code-parse#file-code-parse-core-converters-syntax-converter-ts",
            "json": "https://banes-lab.com/json/source/code-parse/core/converters/syntax.converter.ts",
            "label": "core/converters/syntax.converter.ts",
            "markdown": "https://banes-lab.com/source/code-parse/core/converters/syntax.converter.ts.md",
            "ref": "anatomy:file-code-parse-core-converters-syntax-converter-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 78,
      "name": "runParser",
      "signature": "const runParser = function runParser(loaded: Language, source: string, logger?: ParseLogger): CstNode | null {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "configuration/strings/syntax.strings.ts",
          "name": "noGrammar",
          "source": {
            "href": "https://banes-lab.com/anatomy/code-parse#file-code-parse-configuration-strings-syntax-strings-ts",
            "json": "https://banes-lab.com/json/source/code-parse/configuration/strings/syntax.strings.ts",
            "label": "configuration/strings/syntax.strings.ts",
            "markdown": "https://banes-lab.com/source/code-parse/configuration/strings/syntax.strings.ts.md",
            "ref": "anatomy:file-code-parse-configuration-strings-syntax-strings-ts"
          }
        },
        {
          "file": "core/converters/syntax.converter.ts",
          "name": "ensureLanguages",
          "source": {
            "href": "https://banes-lab.com/anatomy/code-parse#file-code-parse-core-converters-syntax-converter-ts",
            "json": "https://banes-lab.com/json/source/code-parse/core/converters/syntax.converter.ts",
            "label": "core/converters/syntax.converter.ts",
            "markdown": "https://banes-lab.com/source/code-parse/core/converters/syntax.converter.ts.md",
            "ref": "anatomy:file-code-parse-core-converters-syntax-converter-ts"
          }
        },
        {
          "file": "core/converters/syntax.converter.ts",
          "name": "parseCodeSync",
          "source": {
            "href": "https://banes-lab.com/anatomy/code-parse#file-code-parse-core-converters-syntax-converter-ts",
            "json": "https://banes-lab.com/json/source/code-parse/core/converters/syntax.converter.ts",
            "label": "core/converters/syntax.converter.ts",
            "markdown": "https://banes-lab.com/source/code-parse/core/converters/syntax.converter.ts.md",
            "ref": "anatomy:file-code-parse-core-converters-syntax-converter-ts"
          }
        }
      ],
      "callers": [],
      "exported": true,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 107,
      "name": "parseCode",
      "signature": "export const parseCode = async function parseCode("
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/resolvers/grammar.resolver.ts",
          "name": "grammarPath",
          "source": {
            "href": "https://banes-lab.com/anatomy/code-parse#file-code-parse-core-resolvers-grammar-resolver-ts",
            "json": "https://banes-lab.com/json/source/code-parse/core/resolvers/grammar.resolver.ts",
            "label": "core/resolvers/grammar.resolver.ts",
            "markdown": "https://banes-lab.com/source/code-parse/core/resolvers/grammar.resolver.ts.md",
            "ref": "anatomy:file-code-parse-core-resolvers-grammar-resolver-ts"
          }
        },
        {
          "file": "core/resolvers/grammar.resolver.ts",
          "name": "resolveGrammarDir",
          "source": {
            "href": "https://banes-lab.com/anatomy/code-parse#file-code-parse-core-resolvers-grammar-resolver-ts",
            "json": "https://banes-lab.com/json/source/code-parse/core/resolvers/grammar.resolver.ts",
            "label": "core/resolvers/grammar.resolver.ts",
            "markdown": "https://banes-lab.com/source/code-parse/core/resolvers/grammar.resolver.ts.md",
            "ref": "anatomy:file-code-parse-core-resolvers-grammar-resolver-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 25,
      "name": "wasmFor",
      "signature": "const wasmFor = function wasmFor(language: string): string {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/converters/syntax.converter.ts",
          "name": "adaptTree",
          "source": {
            "href": "https://banes-lab.com/anatomy/code-parse#file-code-parse-core-converters-syntax-converter-ts",
            "json": "https://banes-lab.com/json/source/code-parse/core/converters/syntax.converter.ts",
            "label": "core/converters/syntax.converter.ts",
            "markdown": "https://banes-lab.com/source/code-parse/core/converters/syntax.converter.ts.md",
            "ref": "anatomy:file-code-parse-core-converters-syntax-converter-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 68,
      "name": "parseOnce",
      "signature": "const parseOnce = function parseOnce(loaded: Language, source: string, logger?: ParseLogger): ParseAttempt {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 15,
      "name": "languageCache",
      "signature": "const languageCache = new Map<string, Language>();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 16,
      "name": "inFlight",
      "signature": "const inFlight = new Map<string, Promise<Language>>();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 17,
      "name": "initPromise",
      "signature": "let initPromise: Promise<void> | null = null;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 18,
      "name": "loadChain",
      "signature": "let loadChain: Promise<unknown> = Promise.resolve();"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 29,
      "name": "loadLanguage",
      "signature": "const loadLanguage = async function loadLanguage(wasm: string): Promise<Language> {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 30,
      "name": "held",
      "signature": "const held = inFlight.get(wasm);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 34,
      "name": "next",
      "signature": "const next = loadChain.then(async () => Language.load(wasm));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 41,
      "name": "pending",
      "signature": "const pending = wasms.filter((wasm) => !languageCache.has(wasm) && existsSync(wasm));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 44,
      "name": "language",
      "signature": "const language = loaded.at(index);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 61,
      "name": "node",
      "signature": "const node = tree.rootNode;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 62,
      "name": "complete",
      "signature": "const complete = node.startIndex === 0 && node.endIndex === sourceLength;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 63,
      "name": "root",
      "signature": "const root = adaptNode(node);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 69,
      "name": "parser",
      "signature": "const parser = new Parser();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 79,
      "name": "last",
      "signature": "let last: CstNode | null = null;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 80,
      "name": "attempt",
      "signature": "for (let attempt = 0; attempt < PARSE_ATTEMPTS; attempt += 1) {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 82,
      "name": "result",
      "signature": "const result = parseOnce(loaded, source, logger);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 100,
      "name": "loaded",
      "signature": "const loaded = languageCache.get(wasmFor(language));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 112,
      "name": "wasm",
      "signature": "const wasm = wasmFor(language);"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/code-parse#file-code-parse-core-converters-syntax-converter-ts",
  "language": "typescript",
  "layer": "processing",
  "name": "syntax.converter.ts",
  "path": "core/converters/syntax.converter.ts",
  "ref": "anatomy:file-code-parse-core-converters-syntax-converter-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/code-parse#folder-code-parse-core-converters",
          "json": "https://banes-lab.com/json/anatomy/code-parse/folder-code-parse-core-converters",
          "label": "core/converters",
          "markdown": "https://banes-lab.com/anatomy/code-parse/folder-code-parse-core-converters.md",
          "ref": "chapter:/anatomy/code-parse#folder-code-parse-core-converters"
        }
      ],
      "relation": "contained-in"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/code-parse#file-code-parse-configuration-strings-syntax-strings-ts",
          "json": "https://banes-lab.com/json/source/code-parse/configuration/strings/syntax.strings.ts",
          "label": "configuration/strings/syntax.strings.ts",
          "markdown": "https://banes-lab.com/source/code-parse/configuration/strings/syntax.strings.ts.md",
          "ref": "anatomy:file-code-parse-configuration-strings-syntax-strings-ts"
        },
        {
          "href": "https://banes-lab.com/anatomy/code-parse#file-code-parse-core-resolvers-grammar-resolver-ts",
          "json": "https://banes-lab.com/json/source/code-parse/core/resolvers/grammar.resolver.ts",
          "label": "core/resolvers/grammar.resolver.ts",
          "markdown": "https://banes-lab.com/source/code-parse/core/resolvers/grammar.resolver.ts.md",
          "ref": "anatomy:file-code-parse-core-resolvers-grammar-resolver-ts"
        }
      ],
      "relation": "uses"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/code-parse#folder-code-parse-configuration-strings",
          "json": "https://banes-lab.com/json/anatomy/code-parse/folder-code-parse-configuration-strings",
          "label": "configuration/strings",
          "markdown": "https://banes-lab.com/anatomy/code-parse/folder-code-parse-configuration-strings.md",
          "ref": "chapter:/anatomy/code-parse#folder-code-parse-configuration-strings"
        },
        {
          "href": "https://banes-lab.com/anatomy/code-parse#folder-code-parse-core-converters",
          "json": "https://banes-lab.com/json/anatomy/code-parse/folder-code-parse-core-converters",
          "label": "core/converters",
          "markdown": "https://banes-lab.com/anatomy/code-parse/folder-code-parse-core-converters.md",
          "ref": "chapter:/anatomy/code-parse#folder-code-parse-core-converters"
        },
        {
          "href": "https://banes-lab.com/anatomy/code-parse#folder-code-parse-core-resolvers",
          "json": "https://banes-lab.com/json/anatomy/code-parse/folder-code-parse-core-resolvers",
          "label": "core/resolvers",
          "markdown": "https://banes-lab.com/anatomy/code-parse/folder-code-parse-core-resolvers.md",
          "ref": "chapter:/anatomy/code-parse#folder-code-parse-core-resolvers"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "converter",
    "subject": "syntax",
    "variant": null
  },
  "stats": {
    "bytes": 4035,
    "callable": 10,
    "definitions": 27,
    "edges": 10,
    "exported": 5,
    "files": 1,
    "findings": {},
    "flows": {
      "relay": 2,
      "leaf": 4,
      "entry": 3,
      "isolated": 18
    },
    "lines": {
      "blank": 11,
      "code": 108,
      "total": 119
    }
  },
  "summary": "108 lines of code and 27 definitions.",
  "text": "https://banes-lab.com/source/code-parse/core/converters/syntax.converter.ts.txt",
  "tree": "code-parse",
  "siblings": {
    "next": null,
    "previous": {
      "href": "https://banes-lab.com/anatomy/code-parse#file-code-parse-core-converters-grammar-converter-ts",
      "json": "https://banes-lab.com/json/source/code-parse/core/converters/grammar.converter.ts",
      "label": "core/converters/grammar.converter.ts",
      "markdown": "https://banes-lab.com/source/code-parse/core/converters/grammar.converter.ts.md",
      "ref": "anatomy:file-code-parse-core-converters-grammar-converter-ts"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/code-parse/core/converters",
    "label": "core/converters",
    "markdown": "https://banes-lab.com/api/source/code-parse/core/converters.md",
    "ref": "api:source/code-parse/core/converters"
  }
}
