{"_id":"@codincod/codemirror-lang-scala","_rev":"6-d1287949fcea27b564623e05aec5a3b5","name":"@codincod/codemirror-lang-scala","dist-tags":{"latest":"0.5.0"},"versions":{"0.1.0":{"name":"@codincod/codemirror-lang-scala","version":"0.1.0","keywords":["codemirror","code","editor","jvm","scala"],"author":{"name":"CodinCod","email":"hello@codincod.com"},"license":"MIT","_id":"@codincod/codemirror-lang-scala@0.1.0","maintainers":[{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"}],"homepage":"https://codincod.com/","dist":{"shasum":"2b5af051204436b6bde261745eaa566b92b58efd","tarball":"https://registry.npmjs.org/@codincod/codemirror-lang-scala/-/codemirror-lang-scala-0.1.0.tgz","fileCount":14,"integrity":"sha512-vM/QnlfgcV7ZlO7xruLv1A03K+PyC14n0srCgg5HFPyEtTv/372Y9k7r/WZUvYOHiod4Bq+vXPW+moAzNIGX9g==","signatures":[{"sig":"MEUCIQCWo//f9NV0VYGreEz9Iy2eH/ycSpJzr7AJR69h20fdewIgClpeLjaf25CA1dDXmp2WOxTYnT86yX+pLtQUZUpE3UM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":406787},"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":"d2e4cb19c9cd495bb9e83ec854ae69645a89bc97","scripts":{"test":"npm run build && node --test \"test/*.test.ts\"","build":"rm -rf dist && lezer-generator src/scala.grammar -o src/parser.js && cm-buildhelper src/scala.ts","corpus":"npm run build && node test/corpus.ts","prepare":"npm run build","build-debug":"lezer-generator src/scala.grammar --names -o src/parser.js && cm-buildhelper src/scala.ts"},"_npmUser":{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"},"repository":{"url":"git+https://codeberg.org/reeven/codemirror-lang-scala.git","type":"git"},"_npmVersion":"11.6.2","description":"Scala 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-scala_0.1.0_1785933273552_0.34618282159173286","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@codincod/codemirror-lang-scala","version":"0.2.0","keywords":["codemirror","code","editor","jvm","scala"],"author":{"name":"CodinCod","email":"hello@codincod.com"},"license":"MIT","_id":"@codincod/codemirror-lang-scala@0.2.0","maintainers":[{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"}],"homepage":"https://codincod.com/","dist":{"shasum":"c3124bd62d3ccf2e4c4c61055430a1130984a658","tarball":"https://registry.npmjs.org/@codincod/codemirror-lang-scala/-/codemirror-lang-scala-0.2.0.tgz","fileCount":14,"integrity":"sha512-YBdJLlGtPXapXfX8VIyqswYZPH7RmBlPJiFFeZFoLGN6RY+24zpKsZ5AHVMxYtZEgYHWJXsbRlFfC7e5WekqXg==","signatures":[{"sig":"MEUCIGsGryjogOvKPPO/cmoGuUsM4K3XX/DU2x7ez3nSZYuWAiEA9v3UZADgjJgVsL14kR6rHl6FYoy38UcbF1pEESvchw4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":468426},"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":"4028d020efa6556edd7c73e36ec7bb7d6741d9c2","scripts":{"gaps":"npm run build && node ../lezer-survey/src/cli.ts gaps --group top","test":"npm run build && node --test \"test/*.test.ts\"","build":"rm -rf dist && lezer-generator src/scala.grammar -o src/parser.js && cm-buildhelper src/scala.ts","corpus":"npm run build && node ../lezer-survey/src/cli.ts measure --group top","prepare":"npm run build","build-debug":"lezer-generator src/scala.grammar --names -o src/parser.js && cm-buildhelper src/scala.ts"},"_npmUser":{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"},"repository":{"url":"git+https://codeberg.org/reeven/codemirror-lang-scala.git","type":"git"},"_npmVersion":"11.6.2","description":"Scala 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-scala_0.2.0_1785959055365_0.6354273376549486","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@codincod/codemirror-lang-scala","version":"0.2.1","keywords":["codemirror","code","editor","jvm","scala"],"author":{"name":"CodinCod","email":"hello@codincod.com"},"license":"MIT","_id":"@codincod/codemirror-lang-scala@0.2.1","maintainers":[{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"}],"homepage":"https://codincod.com/","dist":{"shasum":"9fa11391e59e15d083cb2e7eef85914583cf917c","tarball":"https://registry.npmjs.org/@codincod/codemirror-lang-scala/-/codemirror-lang-scala-0.2.1.tgz","fileCount":14,"integrity":"sha512-xIhaCt1eO2+W4u76shQbEVCRdajpJyH7K5289gxVB4Gqc0eQusm98tp4UtkyremCA2CWsz1yQtxQc/D6Byh9Zg==","signatures":[{"sig":"MEUCIFtiCmN+5R2OoP/kD5f9Wbd1H4Sgaq6agFZi2upB00TAAiEAhVjUnCSn6KEq2+zCD/bfXU/CMwTwD1LfkhPbh+VzX0M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":468417},"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":"3c75ccc461165e42a98e23dcad7f7f5518efd666","scripts":{"gaps":"npm run build && node ../lezer-survey/src/cli.ts gaps --group top","test":"npm run build && node --test \"test/*.test.ts\"","build":"rm -rf dist && lezer-generator src/scala.grammar -o src/parser.js && cm-buildhelper src/scala.ts","corpus":"npm run build && node ../lezer-survey/src/cli.ts measure --group top","prepare":"npm run build","build-debug":"lezer-generator src/scala.grammar --names -o src/parser.js && cm-buildhelper src/scala.ts"},"_npmUser":{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"},"repository":{"url":"https://codeberg.org/reeven/codemirror-lang-scala","type":"git"},"_npmVersion":"11.6.2","description":"Scala 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-scala_0.2.1_1785971069168_0.09075127191488552","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@codincod/codemirror-lang-scala","version":"0.3.0","keywords":["codemirror","code","editor","jvm","scala"],"author":{"name":"CodinCod","email":"hello@codincod.com"},"license":"MIT","_id":"@codincod/codemirror-lang-scala@0.3.0","maintainers":[{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"}],"homepage":"https://codincod.com/","dist":{"shasum":"191c83b8d873da706faef197d6857f449e2ec043","tarball":"https://registry.npmjs.org/@codincod/codemirror-lang-scala/-/codemirror-lang-scala-0.3.0.tgz","fileCount":14,"integrity":"sha512-XV1y21pgW8THAlMMzEuvKac3Xv4guj6DKZRbBUQvfahT4ohKwcrWVa/Rmt4KHHbMaTh6PUo9Nx3IFBhIFRzI/g==","signatures":[{"sig":"MEYCIQCwAqzinuqKsJXrUQ4yBywjeEPqc8iOcsO6bE0J+hNf9QIhALoI/cOZUi5IBm+bfFfk2m8On0YgEFLiOMTyZ9Kl45x2","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":501840},"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":"8bb25899e55f1064dcae8a7d92f704388990f811","scripts":{"gaps":"npm run build && node ../lezer-survey/src/cli.ts gaps --group top","test":"npm run build && node --test \"test/*.test.ts\"","build":"rm -rf dist && lezer-generator src/scala.grammar -o src/parser.js && cm-buildhelper src/scala.ts","corpus":"npm run build && node ../lezer-survey/src/cli.ts measure --group top","prepare":"npm run build","build-debug":"lezer-generator src/scala.grammar --names -o src/parser.js && cm-buildhelper src/scala.ts"},"_npmUser":{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"},"repository":{"url":"https://codeberg.org/reeven/codemirror-lang-scala","type":"git"},"_npmVersion":"11.6.2","description":"Scala 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-scala_0.3.0_1786391070312_0.08134378015016508","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@codincod/codemirror-lang-scala","version":"0.4.0","keywords":["codemirror","code","editor","jvm","scala"],"author":{"name":"CodinCod","email":"hello@codincod.com"},"license":"MIT","_id":"@codincod/codemirror-lang-scala@0.4.0","maintainers":[{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"}],"homepage":"https://codincod.com/","dist":{"shasum":"59b54a11476107c35d57a722b429a02910e9e0a9","tarball":"https://registry.npmjs.org/@codincod/codemirror-lang-scala/-/codemirror-lang-scala-0.4.0.tgz","fileCount":14,"integrity":"sha512-UwtbW1pbswtJxr/ACT9KM2V0Df64zHAO8kmik0/mLMmZIAQ8MWBkAGPTnxdLbt+Ja1FmvK30mYAZmAiwK/8wrw==","signatures":[{"sig":"MEYCIQDlUTifUKIF7qRm8ufF0hoQLQaC51mwIYT6+uwTtMckLgIhAN+7/XVeHu84rkOv+PxvTd/SHfss8HsOJULlwCWf0JfK","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":574815},"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":"b48f093a8b67058047dc984582adc3d92c916ef8","scripts":{"fuzz":"npm run build && node ../lezer-survey/src/cli.ts fuzz","gaps":"npm run build && node ../lezer-survey/src/cli.ts gaps --group top","test":"npm run build && node --test \"test/*.test.ts\"","build":"rm -rf dist && lezer-generator src/scala.grammar -o src/parser.js && cm-buildhelper src/scala.ts","measure":"npm run build && node ../lezer-survey/src/cli.ts measure --group top","prepare":"npm run build","build-debug":"lezer-generator src/scala.grammar --names -o src/parser.js && cm-buildhelper src/scala.ts"},"_npmUser":{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"},"repository":{"url":"https://codeberg.org/reeven/codemirror-lang-scala","type":"git"},"_npmVersion":"11.6.2","description":"Scala language support for the CodeMirror code editor","directories":{},"sideEffects":false,"_nodeVersion":"25.0.0","dependencies":{"@lezer/lr":"^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-scala_0.4.0_1786660183606_0.08956607045001541","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@codincod/codemirror-lang-scala","version":"0.5.0","description":"Scala language support for the CodeMirror code editor","keywords":["codemirror","code","editor","jvm","scala"],"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/scala.grammar -o src/parser.js && cm-buildhelper src/scala.ts","build-debug":"lezer-generator src/scala.grammar --names -o src/parser.js && cm-buildhelper src/scala.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 top","fuzz":"npm run build && node ../lezer-survey/src/cli.ts fuzz","gaps":"npm run build && node ../lezer-survey/src/cli.ts gaps --group top"},"dependencies":{"@codemirror/autocomplete":"^6.0.0","@codemirror/language":"^6.0.0","@lezer/highlight":"^1.0.0","@lezer/lr":"^1.0.0"},"devDependencies":{"@codemirror/buildhelper":"^1.0.2","@codemirror/state":"^6.7.1","@lezer/generator":"^1.7.0","typescript":"^5.6.0"},"homepage":"https://codincod.com/","repository":{"type":"git","url":"https://codeberg.org/reeven/codemirror-lang-scala"},"gitHead":"b48f093a8b67058047dc984582adc3d92c916ef8","_id":"@codincod/codemirror-lang-scala@0.5.0","_nodeVersion":"25.0.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-0gLXpsgY3F5g0bYsd8ShdeU5jyWPBQE7R+jVTEpvlvj2yGNQ3kFRdptUADMmh8Bwx6kEPOSpEAtnumkBI44Cwg==","shasum":"e228092abc200aecfc94e4a4a7ba15810ef08c83","tarball":"https://registry.npmjs.org/@codincod/codemirror-lang-scala/-/codemirror-lang-scala-0.5.0.tgz","fileCount":14,"unpackedSize":574815,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIC5ZmOX+Br/UI2dR0Ip+GDCW9jdZ50qPaJ2dYF9oD0BjAiEAzjGj1fANh6y6CV7hBbDkUGu7Zi0gZttZSPcGm+z62HA="}]},"_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-scala_0.5.0_1786761029203_0.6887601667004348"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-05T12:34:33.370Z","modified":"2026-08-15T02:30:29.543Z","0.1.0":"2026-08-05T12:34:33.735Z","0.2.0":"2026-08-05T19:44:15.552Z","0.2.1":"2026-08-05T23:04:29.339Z","0.3.0":"2026-08-10T19:44:30.515Z","0.4.0":"2026-08-13T22:29:43.832Z","0.5.0":"2026-08-15T02:30:29.348Z"},"author":{"name":"CodinCod","email":"hello@codincod.com"},"license":"MIT","homepage":"https://codincod.com/","keywords":["codemirror","code","editor","jvm","scala"],"repository":{"type":"git","url":"https://codeberg.org/reeven/codemirror-lang-scala"},"description":"Scala language support for the CodeMirror code editor","maintainers":[{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"}],"readme":"# @codincod/codemirror-lang-scala\n\nThis package implements [Scala](https://www.scala-lang.org/) language support\nfor the [CodeMirror](https://codemirror.net/) code editor: a\n[Lezer](https://lezer.codemirror.net/) grammar, highlighting, indentation,\nfolding and completion for the core library.\n\nThe grammar is written from scratch. Scala has never had a Lezer grammar, and\nwhat a CodeMirror 6 editor could reach for until now was the `clike` stream mode\nin `@codemirror/legacy-modes`, which reads Scala as a curly-braced language with\na longer keyword list.\n\nBoth dialects are read by one grammar. A file may brace its blocks or indent\nthem, and may do both.\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-scala/src/branch/master/LICENSE).\n\n## Usage\n\n```javascript\nimport {EditorView, basicSetup} from \"codemirror\"\nimport {scala} from \"@codincod/codemirror-lang-scala\"\n\nconst view = new EditorView({\n  parent: document.body,\n  doc: `enum Shape:\n  case Circle(radius: Double)\n  case Rectangle(width: Double, height: Double)\n\nobject Shape:\n  extension (shape: Shape)\n    def area: Double = shape match\n      case Circle(r)       => math.Pi * r * r\n      case Rectangle(w, h) => w * h\n\n@main def report(): Unit =\n  val shapes = List(Shape.Circle(1.0), Shape.Rectangle(2.0, 3.0))\n  for shape <- shapes do\n    println(f\"\\${shape.area}%2.2f\")\n`,\n  extensions: [basicSetup, scala()]\n})\n```\n\n## What it reads\n\nMeasured against the stream mode it replaces, over 1072 files of Scala from\nCodinCod's language-guessing pool: the stream mode carries a highlighting tag on\n**85.76%** of the text in 7 colours, with 43.30% of it in the busiest one. This\npackage tags **99.98%** in 11 colours, with 35.71% in the busiest.\n\nOver the same 1072 files, **86.29%** parse with no error node. Over 29546 files\nand 59.84 MiB of cats, zio, the Scala 2 compiler and the Scala 3 compiler,\n**87.31%** do: cats 94.85%, zio 90.51%, scala2 91.83%, scala3 84.53%. The two\ncompilers carry their own test suites, and 7838 of those files are code that\nwas written not to compile, so a share of the remainder is Scala nobody meant\nto be read.\n\nThree things took most of the work.\n\n* **Scala 3 writes no braces.** A region opens where a line stands further right\n  than the one that opened it, and closes at the first line to the left of it.\n  The parser is handed zero-width `indent` and `dedent` tokens for the braces\n  nobody wrote. A region is only ever opened where the grammar could take a\n  body, so an argument list broken over lines opens nothing, and a class header\n  continued on the next line is read as the header it still is.\n* **A line break ends a statement.** Scala spends few semicolons, so one is\n  inserted wherever a break ended something that could stand alone. The newline\n  is kept in the parser's context rather than read back out of the text, because\n  a zero-width token leaves the text exactly as it found it, and a token that\n  cannot tell it has already fired will fire forever.\n* **Scala 3 reserved nothing.** `end`, `open`, `inline`, `opaque`,\n  `transparent`, `infix`, `extension` and `derives` are all ordinary names, and\n  in this corpus they are: `end` is somebody's field or method wherever a\n  collection has one. Each is decided by one word of lookahead in the tokenizer,\n  so where the grammar wants the keyword it gets it, and everywhere else the\n  name survives. `case` is decided the same\n  way, which is what tells `case class Foo` from the `case Foo` that opens a\n  clause, and `@inline` is an annotation rather than a modifier because of the\n  character in front of it. `inline` and `erased` modify a parameter as well as\n  a definition, and there the word after them is somebody's parameter name, so\n  those two are decided by the name and colon standing after them instead.\n\nSmaller things worth naming.\n\n* **Strings are cut into their pieces.** `s\"hi $name, ${1 + 2}\"` reaches the\n  tree as an interpolator, its text, a variable and a block of code, so a theme\n  can colour the hole differently from the string around it. A plain string\n  takes escapes and no holes, `\"\"\"raw\"\"\"` takes neither, and `s\"\"\"...\"\"\"` takes\n  holes and no escapes. Each is a rule of its own, because the tokenizer asks\n  the parser which kind of string it is standing in and one rule covering two\n  of them answers wrongly.\n* **A name says what it is.** A capitalised name is a type and a lowercase one\n  is a value, which is the whole of what tells `case Some(x)` matching from\n  `case some` binding. A parameter, a definition and a use each reach a\n  different node.\n* **`*` is four tokens.** Multiplication, the star that ends a parameter list,\n  the one that spreads a sequence into an argument list, and kind-projector's\n  `Map[K, *]`. The middle two are decided by what stands on either side of the\n  star, because by the time the grammar sees it the parser has already chosen\n  to multiply.\n* **An operator with an operand on neither side is a name.** `???` is the\n  standard library's value for something nobody has written yet, and it is a\n  method spelled out of the characters an operator is made of. An infix\n  operator has something to its left and a prefix operator something to its\n  right, so a run with neither is neither, and reaches the tree as the name it\n  is.\n* **Capture checking.** `IterableOnce[A]^` captures something and `AnyRef^{ll}`\n  says what. dotty's own library is written in it. The caret is an ordinary\n  method name as well, and is told apart the same way the splat star is: a\n  capture touches the type it closes.\n* **A type computes.** `X match { case String => Char }` is read by the rule a\n  pattern match is read by, so its clauses reach the tree as the clauses they\n  are. `[X] =>> F[X]` and `[X] => F[X] => G[X]` are one rule told apart by its\n  arrow. `A Ior B` is `Ior[A, B]`, which is how cats and zio are written.\n* **A list may end on a comma.** Scala 2.13 lets a bracket broken over several\n  lines carry one after its last item, and every build file does.\n\n## What it does not read\n\n* **Postfix notation.** `xs head` is legal Scala 2 and is not read as a call.\n  Both readings of `1 to 10` parse, and keeping the postfix one would make every\n  `x max y` in the corpus ambiguous for the sake of a form Scala 3 has\n  deprecated.\n* **XML literals.** Dropped from Scala 3, and 0.6% of the corpus.\n* **`inline x match`.** The word before an inline match is decided a word at a\n  time like every other soft keyword, and the `match` that would decide this one\n  stands after the thing being matched rather than after the word.\n* **Capture arrows and capture-set bounds.** `List[() ->{C} Unit]` and\n  `[A: {Arbitrary, Ordering}]`. The first is dotty-internal; the second collides\n  with a refinement type at the brace, and is 0.2% of the corpus.\n* **`given (using c: C): T = ...`, the unnamed given whose signature is nothing\n  but a parameter list.** The named form and the one taking type parameters both\n  work.\n* **Named tuples**, `(name: String, age: Int)`, which Scala 3.7 added.\n\nOne thing that looks like a gap and is not a rule. A file deep enough in braced\nblocks inside an indentation region loses the `else` of an `if`, and every\nsingle reduction of the case makes it parse. That is `@lezer/lr` pruning a\nstack rather than a production nobody wrote; the same file fails the same way\nwith two of its patterns removed and passes with three.\n\n## Measuring it yourself\n\n```bash\nnpm run corpus -- path/to/scala/files\n```\n\nNo corpus ships with the package, because none of that code is ours to\nredistribute. Point it at your own; it counts files with no error node and\ngroups them by directory, so a project that drags the total down names itself.\n","readmeFilename":"README.md"}