mirror of
https://github.com/colbymchenry/codegraph.git
synced 2026-10-17 05:07:37 +08:00
fix(kotlin): no automatic semicolon before a same-line infix e-word (#2173)
tree-sitter-kotlin 0.3.8's external scanner inserted an automatic semicolon on the same line before any word starting with `e` other than `else`, so Exposed's `Users.id eq id1` ended its statement early and error recovery could swallow the class around it (r2dbc UpsertTests became one loose function nesting every test). Patch scanner.c (same line: never a semicolon before an e-word) in both the vendored kernel C and the wasm build; provenance, shas and rebuild recipe in docs/grammars/tree-sitter-kotlin.md. Exposed files with a parse error 229 -> 71 of 1,004; koin, nowinandroid, moshi, okio, okhttp and kotlinx.coroutines unchanged (one okhttp file fixed, none broken); kernel-parity 0 diffs. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,9 @@ fn main() {
|
||||
// against the crates.io tarball (kotlin checklist §Grammar prep):
|
||||
// parser.c 54104a7ef1555c265b746c790e0f8bb953cc17806e9df0c3af82f7f62c06a70a
|
||||
// scanner.c 27f73337ec357fc341fa57538f34c14277b0346980c3405dc30beab6202ec6d0
|
||||
// scanner.c carries docs/grammars/tree-sitter-kotlin.patch (same-line
|
||||
// `e`-word semicolon fix), shared with the wasm build:
|
||||
// scanner.c 2ca842dd04b60b0a6df59a03e9ad01209d8c5641f079a79a84d65708669b6cb6 (patched)
|
||||
// Flags crib the tarball's own bindings/rust/build.rs.
|
||||
let mut c = cc::Build::new();
|
||||
c.include("grammars/kotlin");
|
||||
|
||||
Reference in New Issue
Block a user