{
  "definitions": [
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/factories/grammar.factory.ts",
          "name": "assemble",
          "source": {
            "href": "https://banes-lab.com/anatomy/context#file-context-core-factories-grammar-factory-ts",
            "json": "https://banes-lab.com/json/source/context/core/factories/grammar.factory.ts",
            "label": "core/factories/grammar.factory.ts",
            "markdown": "https://banes-lab.com/source/context/core/factories/grammar.factory.ts.md",
            "ref": "anatomy:file-context-core-factories-grammar-factory-ts"
          }
        },
        {
          "file": "core/validators/document.validator.ts",
          "name": "verdictOf",
          "source": {
            "href": "https://banes-lab.com/anatomy/context#file-context-core-validators-document-validator-ts",
            "json": "https://banes-lab.com/json/source/context/core/validators/document.validator.ts",
            "label": "core/validators/document.validator.ts",
            "markdown": "https://banes-lab.com/source/context/core/validators/document.validator.ts.md",
            "ref": "anatomy:file-context-core-validators-document-validator-ts"
          }
        }
      ],
      "exported": true,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 78,
      "name": "validate",
      "signature": "export const validate = function validate(text: string): ValidateResult {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/validators/document.validator.ts",
          "name": "validate",
          "source": {
            "href": "https://banes-lab.com/anatomy/context#file-context-core-validators-document-validator-ts",
            "json": "https://banes-lab.com/json/source/context/core/validators/document.validator.ts",
            "label": "core/validators/document.validator.ts",
            "markdown": "https://banes-lab.com/source/context/core/validators/document.validator.ts.md",
            "ref": "anatomy:file-context-core-validators-document-validator-ts"
          }
        }
      ],
      "callers": [
        {
          "file": "core/validators/document.validator.ts",
          "name": "validateDocuments",
          "source": {
            "href": "https://banes-lab.com/anatomy/context#file-context-core-validators-document-validator-ts",
            "json": "https://banes-lab.com/json/source/context/core/validators/document.validator.ts",
            "label": "core/validators/document.validator.ts",
            "markdown": "https://banes-lab.com/source/context/core/validators/document.validator.ts.md",
            "ref": "anatomy:file-context-core-validators-document-validator-ts"
          }
        }
      ],
      "exported": true,
      "flow": "relay",
      "kind": "lexical_declaration",
      "line": 95,
      "name": "verdictOf",
      "signature": "export const verdictOf = function verdictOf(source: DocumentSource, text: string): DocumentVerdict {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/converters/text.converter.ts",
          "name": "splitLines",
          "source": {
            "href": "https://banes-lab.com/anatomy/context#file-context-core-converters-text-converter-ts",
            "json": "https://banes-lab.com/json/source/context/core/converters/text.converter.ts",
            "label": "core/converters/text.converter.ts",
            "markdown": "https://banes-lab.com/source/context/core/converters/text.converter.ts.md",
            "ref": "anatomy:file-context-core-converters-text-converter-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 31,
      "name": "tokenDefects",
      "signature": "const tokenDefects = function tokenDefects(text: string): PagDefect[] {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/validators/document.validator.ts",
          "name": "verdictOf",
          "source": {
            "href": "https://banes-lab.com/anatomy/context#file-context-core-validators-document-validator-ts",
            "json": "https://banes-lab.com/json/source/context/core/validators/document.validator.ts",
            "label": "core/validators/document.validator.ts",
            "markdown": "https://banes-lab.com/source/context/core/validators/document.validator.ts.md",
            "ref": "anatomy:file-context-core-validators-document-validator-ts"
          }
        }
      ],
      "callers": [],
      "exported": true,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 112,
      "name": "validateDocuments",
      "signature": "export const validateDocuments = function validateDocuments(sources: readonly DocumentSource[]): DocumentVerdict[] {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 16,
      "name": "COLON",
      "signature": "const COLON = \":\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 17,
      "name": "DECLARATION_TOKEN",
      "signature": "const DECLARATION_TOKEN = \"THIS\";"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 19,
      "name": "lineDefect",
      "signature": "const lineDefect = function lineDefect(trimmed: string, lineNo: number): PagDefect | null {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 23,
      "name": "lower",
      "signature": "const lower = LOWERCASE_KEYWORDS.find((keyword) => trimmed.startsWith(keyword));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 27,
      "name": "needsColon",
      "signature": "const needsColon = NEEDS_COLON.find((head) => trimmed.startsWith(head) && !trimmed.includes(COLON));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 33,
      "name": "trimmed",
      "signature": "const trimmed = line.trim();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 34,
      "name": "defect",
      "signature": "const defect = trimmed === \"\" ? null : lineDefect(trimmed, index + 1);"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 39,
      "name": "retiredDefects",
      "signature": "const retiredDefects = function retiredDefects(doc: PagDocument): PagDefect[] {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 47,
      "name": "invariantDefects",
      "signature": "const invariantDefects = function invariantDefects(doc: PagDocument): PagDefect[] {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 61,
      "name": "duplicateNodeDefects",
      "signature": "const duplicateNodeDefects = function duplicateNodeDefects(doc: PagDocument): PagDefect[] {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 62,
      "name": "seen",
      "signature": "const seen = new Set<string>();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 65,
      "name": "number",
      "signature": "const number = node.number ?? \"\";"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 74,
      "name": "byLine",
      "signature": "const byLine = function byLine(a: PagDefect, b: PagDefect): number {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 79,
      "name": "doc",
      "signature": "const doc = parse(text);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 80,
      "name": "declType",
      "signature": "const declType = doc.declaration?.type;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 81,
      "name": "defects",
      "signature": "const defects: PagDefect[] = ["
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 96,
      "name": "pag",
      "signature": "const pag = pagTextOf(source, text);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 104,
      "name": "offset",
      "signature": "const offset = pag.firstLine - FIRST_LINE;"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/context#file-context-core-validators-document-validator-ts",
  "language": "typescript",
  "layer": "processing",
  "name": "document.validator.ts",
  "path": "core/validators/document.validator.ts",
  "ref": "anatomy:file-context-core-validators-document-validator-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/context#folder-context-core-validators",
          "json": "https://banes-lab.com/json/anatomy/context/folder-context-core-validators",
          "label": "core/validators",
          "markdown": "https://banes-lab.com/anatomy/context/folder-context-core-validators.md",
          "ref": "chapter:/anatomy/context#folder-context-core-validators"
        }
      ],
      "relation": "contained-in"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/context#file-context-core-converters-text-converter-ts",
          "json": "https://banes-lab.com/json/source/context/core/converters/text.converter.ts",
          "label": "core/converters/text.converter.ts",
          "markdown": "https://banes-lab.com/source/context/core/converters/text.converter.ts.md",
          "ref": "anatomy:file-context-core-converters-text-converter-ts"
        }
      ],
      "relation": "uses"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/context#file-context-core-factories-grammar-factory-ts",
          "json": "https://banes-lab.com/json/source/context/core/factories/grammar.factory.ts",
          "label": "core/factories/grammar.factory.ts",
          "markdown": "https://banes-lab.com/source/context/core/factories/grammar.factory.ts.md",
          "ref": "anatomy:file-context-core-factories-grammar-factory-ts"
        }
      ],
      "relation": "used-by"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/context#folder-context-core-converters",
          "json": "https://banes-lab.com/json/anatomy/context/folder-context-core-converters",
          "label": "core/converters",
          "markdown": "https://banes-lab.com/anatomy/context/folder-context-core-converters.md",
          "ref": "chapter:/anatomy/context#folder-context-core-converters"
        },
        {
          "href": "https://banes-lab.com/anatomy/context#folder-context-core-factories",
          "json": "https://banes-lab.com/json/anatomy/context/folder-context-core-factories",
          "label": "core/factories",
          "markdown": "https://banes-lab.com/anatomy/context/folder-context-core-factories.md",
          "ref": "chapter:/anatomy/context#folder-context-core-factories"
        },
        {
          "href": "https://banes-lab.com/anatomy/context#folder-context-core-validators",
          "json": "https://banes-lab.com/json/anatomy/context/folder-context-core-validators",
          "label": "core/validators",
          "markdown": "https://banes-lab.com/anatomy/context/folder-context-core-validators.md",
          "ref": "chapter:/anatomy/context#folder-context-core-validators"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "validator",
    "subject": "document",
    "variant": null
  },
  "stats": {
    "bytes": 4745,
    "callable": 9,
    "definitions": 22,
    "edges": 3,
    "exported": 8,
    "files": 1,
    "findings": {},
    "flows": {
      "leaf": 1,
      "relay": 1,
      "entry": 2,
      "isolated": 18
    },
    "lines": {
      "blank": 10,
      "code": 104,
      "total": 114
    }
  },
  "summary": "104 lines of code and 22 definitions.",
  "text": "https://banes-lab.com/source/context/core/validators/document.validator.ts.txt",
  "tree": "context",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/anatomy/context#file-context-core-validators-exemplar-validator-ts",
      "json": "https://banes-lab.com/json/source/context/core/validators/exemplar.validator.ts",
      "label": "core/validators/exemplar.validator.ts",
      "markdown": "https://banes-lab.com/source/context/core/validators/exemplar.validator.ts.md",
      "ref": "anatomy:file-context-core-validators-exemplar-validator-ts"
    },
    "previous": {
      "href": "https://banes-lab.com/anatomy/context#file-context-core-validators-concept-validator-ts",
      "json": "https://banes-lab.com/json/source/context/core/validators/concept.validator.ts",
      "label": "core/validators/concept.validator.ts",
      "markdown": "https://banes-lab.com/source/context/core/validators/concept.validator.ts.md",
      "ref": "anatomy:file-context-core-validators-concept-validator-ts"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/context/core/validators",
    "label": "core/validators",
    "markdown": "https://banes-lab.com/api/source/context/core/validators.md",
    "ref": "api:source/context/core/validators"
  }
}
