{"_id":"@codincod/codemirror-lang-ada","_rev":"6-8cc25b7098c65d452ce52f278385586c","name":"@codincod/codemirror-lang-ada","dist-tags":{"latest":"0.4.0"},"versions":{"0.1.0":{"name":"@codincod/codemirror-lang-ada","version":"0.1.0","keywords":["editor","code","ada","spark","codemirror"],"author":{"name":"CodinCod","email":"hello@codincod.com"},"license":"MIT","_id":"@codincod/codemirror-lang-ada@0.1.0","maintainers":[{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"}],"dist":{"shasum":"adaca17efc678a9b82de5b0a8c07964c7126f222","tarball":"https://registry.npmjs.org/@codincod/codemirror-lang-ada/-/codemirror-lang-ada-0.1.0.tgz","fileCount":14,"integrity":"sha512-VV5BONsAqBIcF9fUyifHyGAh8MYGQ38U1Mms8YoyRctth0HHTiX/u9Lyx0m7AxTslC+Qmq3oKOICcb/PMKapfw==","signatures":[{"sig":"MEYCIQC0J1vq4WOQz5jayvA090gL48WIAhe1dyjqZsVf5oMijgIhAL4yDsT1sIvjVo83D2y+fV8URR2blhScgxEYEVNo5MY8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":171552},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"gitHead":"3d1cce10409d3f69a28bcd74de7f5e66f5f01a61","scripts":{"test":"npm run build && node --test \"test/*.test.ts\"","build":"rm -rf dist && lezer-generator src/ada.grammar -o src/parser.js && cm-buildhelper src/ada.ts","corpus":"npm run build && node test/corpus.ts","prepare":"npm run build","build-debug":"lezer-generator src/ada.grammar --names -o src/parser.js && cm-buildhelper src/ada.ts"},"_npmUser":{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"},"repository":{"url":"git+https://codeberg.org/reeven/codemirror-lang-ada.git","type":"git"},"_npmVersion":"11.6.2","description":"Ada language support for the CodeMirror code editor","directories":{},"sideEffects":false,"_nodeVersion":"25.0.0","dependencies":{"@lezer/lr":"^1.0.0","@lezer/common":"^1.0.0","@lezer/highlight":"^1.0.0","@codemirror/language":"^6.0.0","@codemirror/autocomplete":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.0","@lezer/generator":"^1.7.0","@codemirror/state":"^6.7.1","@codemirror/buildhelper":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/codemirror-lang-ada_0.1.0_1785096030622_0.0879341233173927","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@codincod/codemirror-lang-ada","version":"0.1.1","keywords":["editor","code","ada","spark","codemirror"],"author":{"name":"CodinCod","email":"hello@codincod.com"},"license":"MIT","_id":"@codincod/codemirror-lang-ada@0.1.1","maintainers":[{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"}],"homepage":"https://codincod.com/","dist":{"shasum":"6aaf5f87e6a3dfe28143f2a310341df3d3788a4f","tarball":"https://registry.npmjs.org/@codincod/codemirror-lang-ada/-/codemirror-lang-ada-0.1.1.tgz","fileCount":14,"integrity":"sha512-tjOBozYFU1LmulIoUnu5f7Rdcnr/C006npUdChcjc7WlQh+cRxNpdm28GNL+RmRtkGtVLj47cjvSIj1w697A1w==","signatures":[{"sig":"MEUCIB7QTXdzEWTo7QIdgbi7q4DEz02PGM+s97ovStRXy2ppAiEApBo+sORyAffHQCpic1SkLUKDWcRqukwOPblCZxYehy4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":171731},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"gitHead":"0a233486d4435c1eac71b9e3b7c62f2b430a33b9","scripts":{"test":"npm run build && node --test \"test/*.test.ts\"","build":"rm -rf dist && lezer-generator src/ada.grammar -o src/parser.js && cm-buildhelper src/ada.ts","corpus":"npm run build && node test/corpus.ts","prepare":"npm run build","build-debug":"lezer-generator src/ada.grammar --names -o src/parser.js && cm-buildhelper src/ada.ts"},"_npmUser":{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"},"repository":{"url":"git+https://codeberg.org/reeven/codemirror-lang-ada.git","type":"git"},"_npmVersion":"11.6.2","description":"Ada language support for the CodeMirror code editor","directories":{},"sideEffects":false,"_nodeVersion":"25.0.0","dependencies":{"@lezer/lr":"^1.0.0","@lezer/common":"^1.0.0","@lezer/highlight":"^1.0.0","@codemirror/language":"^6.0.0","@codemirror/autocomplete":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.0","@lezer/generator":"^1.7.0","@codemirror/state":"^6.7.1","@codemirror/buildhelper":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/codemirror-lang-ada_0.1.1_1785286647080_0.8669065074134639","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@codincod/codemirror-lang-ada","version":"0.1.2","keywords":["editor","code","ada","spark","codemirror"],"author":{"name":"CodinCod","email":"hello@codincod.com"},"license":"MIT","_id":"@codincod/codemirror-lang-ada@0.1.2","maintainers":[{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"}],"homepage":"https://codincod.com/","dist":{"shasum":"1f512bfa1e2e269fc26886e94fb3dd402d8df58e","tarball":"https://registry.npmjs.org/@codincod/codemirror-lang-ada/-/codemirror-lang-ada-0.1.2.tgz","fileCount":14,"integrity":"sha512-1N8W9ghG3BjSSdeEAG3Skhndit7hX4XWuCXVH0vrGgHlOfNcyD6oUZgZhNFrS+FAZoBlLW8TQsxRA9peFEsNOw==","signatures":[{"sig":"MEYCIQDwBtNZz1psP+/l83FsianMwk5Cg2mUmcHPeD2SY/5RVwIhAPW6w+JJxm3cuJGCaWpLWhAp03JBCZhdJnDv/Xviux9h","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":171840},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"gitHead":"50dccc8483f0ea68055e79326ae02ffce4fb5688","scripts":{"gaps":"npm run build && node ../lezer-survey/src/cli.ts gaps --group parent","test":"npm run build && node --test \"test/*.test.ts\"","build":"rm -rf dist && lezer-generator src/ada.grammar -o src/parser.js && cm-buildhelper src/ada.ts","corpus":"npm run build && node ../lezer-survey/src/cli.ts measure --group parent","prepare":"npm run build","build-debug":"lezer-generator src/ada.grammar --names -o src/parser.js && cm-buildhelper src/ada.ts"},"_npmUser":{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"},"repository":{"url":"https://codeberg.org/reeven/codemirror-lang-ada","type":"git"},"_npmVersion":"11.6.2","description":"Ada language support for the CodeMirror code editor","directories":{},"sideEffects":false,"_nodeVersion":"25.0.0","dependencies":{"@lezer/lr":"^1.0.0","@lezer/common":"^1.0.0","@lezer/highlight":"^1.0.0","@codemirror/language":"^6.0.0","@codemirror/autocomplete":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.0","@lezer/generator":"^1.7.0","@codemirror/state":"^6.7.1","@codemirror/buildhelper":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/codemirror-lang-ada_0.1.2_1785969534121_0.3618191962586359","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@codincod/codemirror-lang-ada","version":"0.2.0","keywords":["editor","code","ada","spark","codemirror"],"author":{"name":"CodinCod","email":"hello@codincod.com"},"license":"MIT","_id":"@codincod/codemirror-lang-ada@0.2.0","maintainers":[{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"}],"homepage":"https://codincod.com/","dist":{"shasum":"3bb69f3febba01427583f954212eb5537440fdc2","tarball":"https://registry.npmjs.org/@codincod/codemirror-lang-ada/-/codemirror-lang-ada-0.2.0.tgz","fileCount":14,"integrity":"sha512-K9IpQjXuzNHuPa0FFHAxmeStOVrejQzl2dzWUWsb58gaPzrVSrpApHzktr747oKyL1NlBMsvoRYhhvioi2/x+Q==","signatures":[{"sig":"MEUCIQCMdIOjKgDee0X/VB6l+KJqSR4+0iKkGQHdRyqCpRz5PAIgV9oqZEzAN/AUr2hfGIuu5pwXJGH21wVPI+9sQN4V97M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":185968},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"gitHead":"7988cd55397a99b899b120821cf890a4e06d0f5b","scripts":{"gaps":"npm run build && node ../lezer-survey/src/cli.ts gaps --group parent","test":"npm run build && node --test \"test/*.test.ts\"","build":"rm -rf dist && lezer-generator src/ada.grammar -o src/parser.js && cm-buildhelper src/ada.ts","corpus":"npm run build && node ../lezer-survey/src/cli.ts measure --group parent","prepare":"npm run build","build-debug":"lezer-generator src/ada.grammar --names -o src/parser.js && cm-buildhelper src/ada.ts"},"_npmUser":{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"},"repository":{"url":"https://codeberg.org/reeven/codemirror-lang-ada","type":"git"},"_npmVersion":"11.6.2","description":"Ada language support for the CodeMirror code editor","directories":{},"sideEffects":false,"_nodeVersion":"25.0.0","dependencies":{"@lezer/lr":"^1.0.0","@lezer/common":"^1.0.0","@lezer/highlight":"^1.0.0","@codemirror/language":"^6.0.0","@codemirror/autocomplete":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.0","@lezer/generator":"^1.7.0","@codemirror/state":"^6.7.1","@codemirror/buildhelper":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/codemirror-lang-ada_0.2.0_1786373103754_0.9065189617396758","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@codincod/codemirror-lang-ada","version":"0.3.0","keywords":["editor","code","ada","spark","codemirror"],"author":{"name":"CodinCod","email":"hello@codincod.com"},"license":"MIT","_id":"@codincod/codemirror-lang-ada@0.3.0","maintainers":[{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"}],"homepage":"https://codincod.com/","dist":{"shasum":"6decb606ffc5d85362058a33f7c98874578da28e","tarball":"https://registry.npmjs.org/@codincod/codemirror-lang-ada/-/codemirror-lang-ada-0.3.0.tgz","fileCount":14,"integrity":"sha512-GJm7nRjGrwI0JA33/h2/2v+Fs/OFprdicwkRhvu8J9e/XqzC3RE9NDu2x12m2dcc96xvn0pMVUcUEgiVJkjtpg==","signatures":[{"sig":"MEUCIDSwpB3dbooVq3E+HQ6NQlKYLFt559FUvWW6SSMMLvlnAiEAkfVe6f02oddkSVQrQbDYvXk4UuiBCQpFp1liOjiixXM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":186070},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"gitHead":"8f56b5034cd4adf47b24c9877145a2c8d636dfb6","scripts":{"fuzz":"npm run build && node ../lezer-survey/src/cli.ts fuzz","gaps":"npm run build && node ../lezer-survey/src/cli.ts gaps --group parent","test":"npm run build && node --test \"test/*.test.ts\"","build":"rm -rf dist && lezer-generator src/ada.grammar -o src/parser.js && cm-buildhelper src/ada.ts","measure":"npm run build && node ../lezer-survey/src/cli.ts measure --group parent","prepare":"npm run build","build-debug":"lezer-generator src/ada.grammar --names -o src/parser.js && cm-buildhelper src/ada.ts"},"_npmUser":{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"},"repository":{"url":"https://codeberg.org/reeven/codemirror-lang-ada","type":"git"},"_npmVersion":"11.6.2","description":"Ada language support for the CodeMirror code editor","directories":{},"sideEffects":false,"_nodeVersion":"25.0.0","dependencies":{"@lezer/lr":"^1.0.0","@lezer/common":"^1.0.0","@lezer/highlight":"^1.0.0","@codemirror/state":"^6.7.1","@codemirror/language":"^6.0.0","@codemirror/autocomplete":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.0","@lezer/generator":"^1.7.0","@codemirror/buildhelper":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/codemirror-lang-ada_0.3.0_1786757946494_0.9169288876645212","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@codincod/codemirror-lang-ada","version":"0.4.0","description":"Ada language support for the CodeMirror code editor","keywords":["editor","code","ada","spark","codemirror"],"author":{"name":"CodinCod","email":"hello@codincod.com"},"license":"MIT","type":"module","main":"dist/index.cjs","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"module":"dist/index.js","types":"dist/index.d.ts","sideEffects":false,"scripts":{"build":"rm -rf dist && lezer-generator src/ada.grammar -o src/parser.js && cm-buildhelper src/ada.ts","build-debug":"lezer-generator src/ada.grammar --names -o src/parser.js && cm-buildhelper src/ada.ts","prepare":"npm run build","test":"npm run build && node --test \"test/*.test.ts\"","measure":"npm run build && node ../lezer-survey/src/cli.ts measure --group parent","fuzz":"npm run build && node ../lezer-survey/src/cli.ts fuzz","gaps":"npm run build && node ../lezer-survey/src/cli.ts gaps --group parent"},"dependencies":{"@codemirror/autocomplete":"^6.0.0","@codemirror/language":"^6.0.0","@codemirror/state":"^6.7.1","@lezer/common":"^1.0.0","@lezer/highlight":"^1.0.0","@lezer/lr":"^1.0.0"},"devDependencies":{"@codemirror/buildhelper":"^1.0.2","@lezer/generator":"^1.7.0","typescript":"^5.6.0"},"homepage":"https://codincod.com/","repository":{"type":"git","url":"https://codeberg.org/reeven/codemirror-lang-ada"},"gitHead":"d652c2068995d070b1b6450c713d740e1f89791e","_id":"@codincod/codemirror-lang-ada@0.4.0","_nodeVersion":"25.0.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-ZlWMbUKBNX444WGjng35nBiNhazUyi2BGPMsZMKDvsOZbch1CRAWei2jyLgQVTtsPm+BPnTM5qpALlWH8FBO5Q==","shasum":"43de95ac3a21f3b76d59f755fc059eb47926eef0","tarball":"https://registry.npmjs.org/@codincod/codemirror-lang-ada/-/codemirror-lang-ada-0.4.0.tgz","fileCount":14,"unpackedSize":186070,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIH9BvUhyq25k/XMyF3HeN1VIl4hGdO+7R2KHdu4Eht+XAiEAm1eR35PmJCcKipXsPkgiW5x74bSgdTMAOccNY2ObwPk="}]},"_npmUser":{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"},"directories":{},"maintainers":[{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/codemirror-lang-ada_0.4.0_1786758057927_0.000912321376775882"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-26T20:00:30.484Z","modified":"2026-08-15T01:40:58.243Z","0.1.0":"2026-07-26T20:00:30.789Z","0.1.1":"2026-07-29T00:57:27.249Z","0.1.2":"2026-08-05T22:38:54.290Z","0.2.0":"2026-08-10T14:45:03.953Z","0.3.0":"2026-08-15T01:39:06.773Z","0.4.0":"2026-08-15T01:40:58.097Z"},"author":{"name":"CodinCod","email":"hello@codincod.com"},"license":"MIT","homepage":"https://codincod.com/","keywords":["editor","code","ada","spark","codemirror"],"repository":{"type":"git","url":"https://codeberg.org/reeven/codemirror-lang-ada"},"description":"Ada language support for the CodeMirror code editor","maintainers":[{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"}],"readme":"# @codincod/codemirror-lang-ada [![NPM version](https://img.shields.io/npm/v/@codincod/codemirror-lang-ada.svg)](https://www.npmjs.org/package/@codincod/codemirror-lang-ada)\n\n[ [**CHANGELOG**](https://codeberg.org/reeven/codemirror-lang-ada/src/branch/master/CHANGELOG.md) ]\n\nThis package implements Ada language support for the\n[CodeMirror](https://codemirror.net/) code editor, using a\n[Lezer](https://lezer.codemirror.net/) grammar written for this package.\n\nCodeMirror has never shipped Ada, in either version. Editors that offer it\nusually reach for a Pascal or VHDL mode, which colours some of the keywords and\ngets the rest wrong: `Integer'First` comes out as an unterminated string,\n`'a'` and `'Length` are the same thing, and there is no tree underneath either\nway.\n\nWritten in part for [CodinCod](https://codincod.com/), a competitive coding\nplatform, where it colours the editor people solve puzzles in.\n\nThis code is released under an\n[MIT license](https://codeberg.org/reeven/codemirror-lang-ada/src/branch/master/LICENSE).\n\n## Usage\n\n```javascript\nimport {EditorView, basicSetup} from \"codemirror\"\nimport {ada} from \"@codincod/codemirror-lang-ada\"\n\nconst view = new EditorView({\n  parent: document.body,\n  doc: `with Ada.Text_IO; use Ada.Text_IO;\n\nprocedure Main is\nbegin\n   Put_Line (\"Hello World!\");\nend Main;\n`,\n  extensions: [basicSetup, ada()]\n})\n```\n\n## Coverage\n\nAda 2012, with the Ada 2022 additions that have already reached real code:\nsquare-bracket array aggregates, iterated component associations, the `@`\ntarget name, iterator filters and `parallel`-free loop syntax. Tasking,\nprotected objects, generics, representation clauses, aspect specifications,\nextension aggregates and expression functions are all in.\n\nMeasured against 18805 files of published Ada, counting files that parse with no\nerror node:\n\n| Corpus | Files | Clean |\n| --- | ---: | ---: |\n| GNATprove and the SPARK 2014 testsuite | 13055 | 98.41% |\n| Ada Language Server | 1763 | 94.61% |\n| AWS, the Ada Web Server | 1229 | 99.59% |\n| GtkAda | 774 | 100.00% |\n| Ada Util | 546 | 100.00% |\n| GNATColl | 493 | 100.00% |\n| Alire | 479 | 98.12% |\n| VSS | 466 | 99.36% |\n| All of it | 18805 | 98.30% |\n\nRosetta Code is the other measurement and the softer one: 1447 files, 95.02%.\nA snippet there is a fragment somebody pasted to demonstrate a task, so it never\nreaches for a contract, a private child or a subunit, and half of what still\nfails under it is not Ada at all. Wiki markup left in the source, GNAT project\nfiles, shell transcripts, and pages elided with a literal `...`.\n\nThe two disagreed by 27 points before 0.2.0, and that is why the harder one is\nquoted first.\n\n## Three things a tokenizer has to settle\n\nAlmost all of Ada can be written down as a grammar directly. Three things\ncannot.\n\n**Case does not matter.** `IF`, `If` and `if` are one word, and so are\n`Put_Line` and `PUT_LINE`. Reserved words are recognised by a function that\nlower-cases the word before looking it up, so a file written in the shouting\nstyle of 1983 highlights the same as one written last week.\n\n**An apostrophe is two different things.** `'a'` is a character and\n`Integer'First` is an attribute. Ada settles it by what stands in front: after a\nname or a closing parenthesis the apostrophe is an attribute tick, and elsewhere\nit opens a literal. That rule alone gets `when 'a' =>` wrong, because `when` is a\nword too, so the parser is asked as well: where an attribute could not stand, the\napostrophe is a literal whatever preceded it.\n\n**A quoted operator is sometimes a name.** `\"+\" (A, B)` calls the addition\nfunction and `\"/\"'Result` names its answer in a contract, but `Put (\"+\")`\nprints a plus sign. Two questions the grammar cannot ask settle it: whether the\nquoted text is one of the operators a subprogram may be named after, and\nwhether a `'` or a `(` follows the closing quote. Both have to hold.\n\nOne thing about the grammar is worth saying out loud. Ada writes a call, an\nindex and an aggregate the same way, with a parenthesised list, and cannot tell\nthem apart without knowing what the name means. Neither does this, so there is\none `Arguments` node for all three and no guessing.\n\n## What it gives an editor\n\nSyntax highlighting, folding for subprograms, packages, tasks, blocks, loops and\nrecords, indentation that knows `end`, `else`, `when` and `exception` come back\nout, and completion for the reserved words, the predefined types, the attributes\nand the packages of the standard library.\n\n`adaLanguage` is exported for use with `LanguageSupport`, and `parser` for use\non its own.\n\n## Testing it on your own code\n\n```\nnpm run corpus -- path/to/your/ada\n```\n\nIt prints the files that failed, the first line of each that did, and the\nproportion that came out clean. The corpus itself is not included; Rosetta Code\nis under the GNU Free Documentation License 1.2 and cannot be redistributed\nunder this one.\n","readmeFilename":"README.md"}