Update tree_sitter for the new self syntax and static var (#7025)

This implements p7016 for tree_sitter. It also updates the build and
source file to allow this to build successfully and documents how to
successfully run these tests with Bazel given that it is fundamentally
not hermetic.

Assisted-by: Antigravity with Gemini
This commit is contained in:
Chandler Carruth authored and GitHub committed 2026-04-06 19:31:54 +00:00
1 parent 05ba1d7356
commit 8fd4156616
4 files changed
+43 -6

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
class Point {
var x: i32;
fn GetX(self: Point) -> i32 { return self.x; }
fn GetY(self) -> i32 { return 0; }
fn SetX(ref self, new_x: i32) {}
}
+7
View File
@@ -0,0 +1,7 @@
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
class Widget {
static var count: i32;
}