format cpp and update tsl.vim

This commit is contained in:
csh
2025-06-24 18:20:37 +08:00
parent b339df7bc5
commit d9beeb82a6
3 changed files with 41 additions and 39 deletions
+5 -2
View File
@@ -2,9 +2,11 @@
// 字符串,数字,注释
// 注释 TODO
// abc();
a := "string"; // 字符串
b := 123; // 数字
c := 1.23; // 浮点数
a := "字符串函数func()";
// 类相关
@@ -47,13 +49,14 @@ function f(a: real = 1; b: string = "123"; c: number = abc.CONST1): def; // 带
f();
f(a, b);
f(a: 1; b: 's');
f(f(2, "111"));
// 类变量声明,三元表达式(不应该有冲突)
a: string;
[weakref]b: MyClass;
a ? b : c;
a ? b : c ? d : e;
return ifnil(rpr_.Caps) ? false : rpr_.Caps.IsApplied;
// select
Select ["test"] from table end;
@@ -62,5 +65,5 @@ select distinct ["test"] from table where ['a'] = 1 end;
// array
a := array(1, 2);
b := array((1, 2), (3, 4))
b := array((1, 2), (3, 4));