branch: externals/matlab-mode
commit d442241da4d89a19cecee588b303ea16f3bead50
Author: John Ciolfi <[email protected]>
Commit: John Ciolfi <[email protected]>

    matlab-ts-mode: update to abi/14 87388df nov-11-2025
---
 .../indent_nonconjugate_transpose_issue120.m       | 10 +++++++
 ...dent_nonconjugate_transpose_issue120_expected.m | 10 +++++++
 ...nonconjugate_transpose_issue120_expected_msgs.m | 10 +++++++
 .../indent_parfor_namespace_fcn_issue121.m         |  9 ++++++
 ...indent_parfor_namespace_fcn_issue121_expected.m |  9 ++++++
 ...t_parfor_namespace_fcn_issue121_expected_msgs.m |  9 ++++++
 .../indent_nonconjugate_transpose_issue120.m       | 10 +++++++
 ...nt_nonconjugate_transpose_issue120_expected.txt | 32 ++++++++++++++++++++++
 .../indent_parfor_namespace_fcn_issue121.m         |  9 ++++++
 ...dent_parfor_namespace_fcn_issue121_expected.txt | 25 +++++++++++++++++
 10 files changed, 133 insertions(+)

diff --git 
a/tests/test-matlab-ts-mode-indent-files/indent_nonconjugate_transpose_issue120.m
 
b/tests/test-matlab-ts-mode-indent-files/indent_nonconjugate_transpose_issue120.m
new file mode 100644
index 0000000000..1ffa1e45d3
--- /dev/null
+++ 
b/tests/test-matlab-ts-mode-indent-files/indent_nonconjugate_transpose_issue120.m
@@ -0,0 +1,10 @@
+% -*- matlab-ts -*-
+
+% See https://github.com/acristoffers/tree-sitter-matlab/issues/120
+
+a = [1 2; 3 4];
+b = a;
+
+m1 = [a.'; b.'];
+
+c1 = {a.'; b.'};
diff --git 
a/tests/test-matlab-ts-mode-indent-files/indent_nonconjugate_transpose_issue120_expected.m
 
b/tests/test-matlab-ts-mode-indent-files/indent_nonconjugate_transpose_issue120_expected.m
new file mode 100644
index 0000000000..1ffa1e45d3
--- /dev/null
+++ 
b/tests/test-matlab-ts-mode-indent-files/indent_nonconjugate_transpose_issue120_expected.m
@@ -0,0 +1,10 @@
+% -*- matlab-ts -*-
+
+% See https://github.com/acristoffers/tree-sitter-matlab/issues/120
+
+a = [1 2; 3 4];
+b = a;
+
+m1 = [a.'; b.'];
+
+c1 = {a.'; b.'};
diff --git 
a/tests/test-matlab-ts-mode-indent-files/indent_nonconjugate_transpose_issue120_expected_msgs.m
 
b/tests/test-matlab-ts-mode-indent-files/indent_nonconjugate_transpose_issue120_expected_msgs.m
new file mode 100644
index 0000000000..80f4af674e
--- /dev/null
+++ 
b/tests/test-matlab-ts-mode-indent-files/indent_nonconjugate_transpose_issue120_expected_msgs.m
@@ -0,0 +1,10 @@
+% -*- matlab-ts -*- %  <{Matched rule: ((lambda (node parent _bol &rest _) 
(and node (not (string= (treesit-node-type node) "line_continuation")) (equal 
(treesit-node-type parent) "source_file"))) (lambda (_node _parent bol &rest _) 
(save-excursion (goto-char bol) (line-beginning-position))) 0)}>
+
+% See https://github.com/acristoffers/tree-sitter-matlab/issues/120 %  
<{Matched rule: ((lambda (node parent _bol &rest _) (and node (not (string= 
(treesit-node-type node) "line_continuation")) (equal (treesit-node-type 
parent) "source_file"))) (lambda (_node _parent bol &rest _) (save-excursion 
(goto-char bol) (line-beginning-position))) 0)}>
+
+a = [1 2; 3 4]; %  <{Matched rule: ((lambda (node parent _bol &rest _) (and 
node (not (string= (treesit-node-type node) "line_continuation")) (equal 
(treesit-node-type parent) "source_file"))) (lambda (_node _parent bol &rest _) 
(save-excursion (goto-char bol) (line-beginning-position))) 0)}>
+b = a; %  <{Matched rule: ((lambda (node parent _bol &rest _) (and node (not 
(string= (treesit-node-type node) "line_continuation")) (equal 
(treesit-node-type parent) "source_file"))) (lambda (_node _parent bol &rest _) 
(save-excursion (goto-char bol) (line-beginning-position))) 0)}>
+
+m1 = [a.'; b.']; %  <{Matched rule: ((lambda (node parent _bol &rest _) (and 
node (not (string= (treesit-node-type node) "line_continuation")) (equal 
(treesit-node-type parent) "source_file"))) (lambda (_node _parent bol &rest _) 
(save-excursion (goto-char bol) (line-beginning-position))) 0)}>
+
+c1 = {a.'; b.'}; %  <{Matched rule: ((lambda (node parent _bol &rest _) (and 
node (not (string= (treesit-node-type node) "line_continuation")) (equal 
(treesit-node-type parent) "source_file"))) (lambda (_node _parent bol &rest _) 
(save-excursion (goto-char bol) (line-beginning-position))) 0)}>
diff --git 
a/tests/test-matlab-ts-mode-indent-files/indent_parfor_namespace_fcn_issue121.m 
b/tests/test-matlab-ts-mode-indent-files/indent_parfor_namespace_fcn_issue121.m
new file mode 100644
index 0000000000..d5f90b8237
--- /dev/null
+++ 
b/tests/test-matlab-ts-mode-indent-files/indent_parfor_namespace_fcn_issue121.m
@@ -0,0 +1,9 @@
+% -*- matlab-ts -*-
+
+% See https://github.com/acristoffers/tree-sitter-matlab/issues/121
+
+
+y = ones(1,100);
+parfor (i = 1:100, myutils.maxWorkers)
+    y(i) = i;
+end
diff --git 
a/tests/test-matlab-ts-mode-indent-files/indent_parfor_namespace_fcn_issue121_expected.m
 
b/tests/test-matlab-ts-mode-indent-files/indent_parfor_namespace_fcn_issue121_expected.m
new file mode 100644
index 0000000000..d5f90b8237
--- /dev/null
+++ 
b/tests/test-matlab-ts-mode-indent-files/indent_parfor_namespace_fcn_issue121_expected.m
@@ -0,0 +1,9 @@
+% -*- matlab-ts -*-
+
+% See https://github.com/acristoffers/tree-sitter-matlab/issues/121
+
+
+y = ones(1,100);
+parfor (i = 1:100, myutils.maxWorkers)
+    y(i) = i;
+end
diff --git 
a/tests/test-matlab-ts-mode-indent-files/indent_parfor_namespace_fcn_issue121_expected_msgs.m
 
b/tests/test-matlab-ts-mode-indent-files/indent_parfor_namespace_fcn_issue121_expected_msgs.m
new file mode 100644
index 0000000000..85160fc0bb
--- /dev/null
+++ 
b/tests/test-matlab-ts-mode-indent-files/indent_parfor_namespace_fcn_issue121_expected_msgs.m
@@ -0,0 +1,9 @@
+% -*- matlab-ts -*- %  <{Matched rule: ((lambda (node parent _bol &rest _) 
(and node (not (string= (treesit-node-type node) "line_continuation")) (equal 
(treesit-node-type parent) "source_file"))) (lambda (_node _parent bol &rest _) 
(save-excursion (goto-char bol) (line-beginning-position))) 0)}>
+
+% See https://github.com/acristoffers/tree-sitter-matlab/issues/121 %  
<{Matched rule: ((lambda (node parent _bol &rest _) (and node (not (string= 
(treesit-node-type node) "line_continuation")) (equal (treesit-node-type 
parent) "source_file"))) (lambda (_node _parent bol &rest _) (save-excursion 
(goto-char bol) (line-beginning-position))) 0)}>
+
+
+y = ones(1,100); %  <{Matched rule: ((lambda (node parent _bol &rest _) (and 
node (not (string= (treesit-node-type node) "line_continuation")) (equal 
(treesit-node-type parent) "source_file"))) (lambda (_node _parent bol &rest _) 
(save-excursion (goto-char bol) (line-beginning-position))) 0)}>
+parfor (i = 1:100, myutils.maxWorkers) %  <{Matched rule: ((lambda (node 
parent _bol &rest _) (and node (not (string= (treesit-node-type node) 
"line_continuation")) (equal (treesit-node-type parent) "source_file"))) 
(lambda (_node _parent bol &rest _) (save-excursion (goto-char bol) 
(line-beginning-position))) 0)}>
+    y(i) = i; %  <{Matched rule: ((node-is 
"\\`\\(?:arguments_statement\\|block\\|e\\(?:num\\(?:eration\\)?\\|vents\\)\\|function_definition\\|methods\\|propert\\(?:ies\\|y\\)\\)\\'")
 parent 4)}>
+end %  <{Matched rule: ((node-is 
"\\`\\(?:catch_clause\\|e\\(?:lse\\(?:\\(?:if\\)?_clause\\)\\|nd\\)\\)\\'") 
parent 0)}>
diff --git 
a/tests/test-matlab-ts-mode-parser-files/copy-of-test-matlab-ts-mode-indent-files/indent_nonconjugate_transpose_issue120.m
 
b/tests/test-matlab-ts-mode-parser-files/copy-of-test-matlab-ts-mode-indent-files/indent_nonconjugate_transpose_issue120.m
new file mode 100644
index 0000000000..1ffa1e45d3
--- /dev/null
+++ 
b/tests/test-matlab-ts-mode-parser-files/copy-of-test-matlab-ts-mode-indent-files/indent_nonconjugate_transpose_issue120.m
@@ -0,0 +1,10 @@
+% -*- matlab-ts -*-
+
+% See https://github.com/acristoffers/tree-sitter-matlab/issues/120
+
+a = [1 2; 3 4];
+b = a;
+
+m1 = [a.'; b.'];
+
+c1 = {a.'; b.'};
diff --git 
a/tests/test-matlab-ts-mode-parser-files/copy-of-test-matlab-ts-mode-indent-files/indent_nonconjugate_transpose_issue120_expected.txt
 
b/tests/test-matlab-ts-mode-parser-files/copy-of-test-matlab-ts-mode-indent-files/indent_nonconjugate_transpose_issue120_expected.txt
new file mode 100644
index 0000000000..682a76d121
--- /dev/null
+++ 
b/tests/test-matlab-ts-mode-parser-files/copy-of-test-matlab-ts-mode-indent-files/indent_nonconjugate_transpose_issue120_expected.txt
@@ -0,0 +1,32 @@
+# -*- t-utils-ts-parse-tree -*-
+(source_file (comment[1,20]@{% -*- matlab-ts -*-}@) (comment[22,89]@{% See 
https://github.com/acristoffers/tree-sitter-...}@)
+ (assignment left: (identifier[91,92]@{a}@) =[93,94]
+  right: 
+   (matrix [[95,96]
+    (row (number[96,97]@{1}@) ,[98,98] (number[98,99]@{2}@))
+    ;[99,100]
+    (row (number[101,102]@{3}@) ,[103,103] (number[103,104]@{4}@))
+    ][104,105]))
+ ;[105,106]
+ (assignment left: (identifier[107,108]@{b}@) =[109,110] right: 
(identifier[111,112]@{a}@))
+ ;[112,113]
+ (assignment left: (identifier[115,117]@{m1}@) =[118,119]
+  right: 
+   (matrix [[120,121]
+    (row
+     (postfix_operator operand: (identifier[121,122]@{a}@) .'[122,124]))
+    ;[124,125]
+    (row
+     (postfix_operator operand: (identifier[126,127]@{b}@) .'[127,129]))
+    ][129,130]))
+ ;[130,131]
+ (assignment left: (identifier[133,135]@{c1}@) =[136,137]
+  right: 
+   (cell {[138,139]
+    (row
+     (postfix_operator operand: (identifier[139,140]@{a}@) .'[140,142]))
+    ;[142,143]
+    (row
+     (postfix_operator operand: (identifier[144,145]@{b}@) .'[145,147]))
+    }[147,148]))
+ ;[148,149] \n[149,150])
diff --git 
a/tests/test-matlab-ts-mode-parser-files/copy-of-test-matlab-ts-mode-indent-files/indent_parfor_namespace_fcn_issue121.m
 
b/tests/test-matlab-ts-mode-parser-files/copy-of-test-matlab-ts-mode-indent-files/indent_parfor_namespace_fcn_issue121.m
new file mode 100644
index 0000000000..d5f90b8237
--- /dev/null
+++ 
b/tests/test-matlab-ts-mode-parser-files/copy-of-test-matlab-ts-mode-indent-files/indent_parfor_namespace_fcn_issue121.m
@@ -0,0 +1,9 @@
+% -*- matlab-ts -*-
+
+% See https://github.com/acristoffers/tree-sitter-matlab/issues/121
+
+
+y = ones(1,100);
+parfor (i = 1:100, myutils.maxWorkers)
+    y(i) = i;
+end
diff --git 
a/tests/test-matlab-ts-mode-parser-files/copy-of-test-matlab-ts-mode-indent-files/indent_parfor_namespace_fcn_issue121_expected.txt
 
b/tests/test-matlab-ts-mode-parser-files/copy-of-test-matlab-ts-mode-indent-files/indent_parfor_namespace_fcn_issue121_expected.txt
new file mode 100644
index 0000000000..16fd3fba1b
--- /dev/null
+++ 
b/tests/test-matlab-ts-mode-parser-files/copy-of-test-matlab-ts-mode-indent-files/indent_parfor_namespace_fcn_issue121_expected.txt
@@ -0,0 +1,25 @@
+# -*- t-utils-ts-parse-tree -*-
+(source_file (comment[1,20]@{% -*- matlab-ts -*-}@) (comment[22,89]@{% See 
https://github.com/acristoffers/tree-sitter-...}@)
+ (assignment left: (identifier[92,93]@{y}@) =[94,95]
+  right: 
+   (function_call name: (identifier[96,100]@{ones}@) ([100,101]
+    (arguments argument: (number[101,102]@{1}@) ,[102,103] 
(number[103,106]@{100}@))
+    )[106,107]))
+ ;[107,108] \n[108,109]
+ (for_statement parfor[109,115] ([116,117]
+  (iterator (identifier[117,118]@{i}@) =[119,120]
+   (range (number[121,122]@{1}@) :[122,123] (number[123,126]@{100}@)))
+  ,[126,127]
+  (parfor_options
+   (field_expression object: (identifier[128,135]@{myutils}@) .[135,136] 
field: (identifier[136,146]@{maxWorkers}@)))
+  )[146,147]
+  (block
+   (assignment
+    left: 
+     (function_call name: (identifier[152,153]@{y}@) ([153,154]
+      (arguments argument: (identifier[154,155]@{i}@))
+      )[155,156])
+    =[157,158] right: (identifier[159,160]@{i}@))
+   ;[160,161] \n[161,162])
+  end[162,165])
+ \n[165,166])

Reply via email to