aboutsummaryrefslogtreecommitdiffstats
path: root/tests/query/highlights/julia
diff options
context:
space:
mode:
authorAmaan Qureshi <amaanq12@gmail.com>2023-03-09 19:58:04 -0500
committerAmaan Qureshi <amaanq12@gmail.com>2023-03-10 03:38:23 -0500
commitffa6efa7f55e88be72812c47e4286fda48ab94f0 (patch)
treefabff796afd6f890bb5c8af9331e0883bdc72c2c /tests/query/highlights/julia
parentfeat(julia): add builtin functions & types (diff)
downloadnvim-treesitter-ffa6efa7f55e88be72812c47e4286fda48ab94f0.tar
nvim-treesitter-ffa6efa7f55e88be72812c47e4286fda48ab94f0.tar.gz
nvim-treesitter-ffa6efa7f55e88be72812c47e4286fda48ab94f0.tar.bz2
nvim-treesitter-ffa6efa7f55e88be72812c47e4286fda48ab94f0.tar.lz
nvim-treesitter-ffa6efa7f55e88be72812c47e4286fda48ab94f0.tar.xz
nvim-treesitter-ffa6efa7f55e88be72812c47e4286fda48ab94f0.tar.zst
nvim-treesitter-ffa6efa7f55e88be72812c47e4286fda48ab94f0.zip
feat(julia): add tests for new changes
Diffstat (limited to 'tests/query/highlights/julia')
-rw-r--r--tests/query/highlights/julia/test.jl26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/query/highlights/julia/test.jl b/tests/query/highlights/julia/test.jl
new file mode 100644
index 000000000..46fc313c0
--- /dev/null
+++ b/tests/query/highlights/julia/test.jl
@@ -0,0 +1,26 @@
+function load_data(::Symbol; ::Int) :: Tuple
+# <- keyword.function
+# ^ function
+# ^ punctuation.bracket
+# ^^ punctuation.delimiter
+# ^ type.builtin
+# ^ punctuation.delimiter
+# ^^ punctuation.delimiter
+# ^^^ type.builtin
+# ^ punctuation.bracket
+# ^^ punctuation.delimiter
+# ^ type.builtin
+ dataset = CIFAR10(; Tx = Float32, split = split)
+# ^^^^^^^ variable
+# ^ operator
+# ^ function.call
+# ^ operator
+# ^ type.builtin
+ X = reshape(dataset.features[:, :, :, begin:n_obs], :, n_obs) # flattening the image pixels
+# ^^^^^ variable.builtin
+ y = categorical2onehot(dataset.targets[begin:n_obs], N_LABELS)
+# ^^^^^ variable.builtin
+ return X, y
+# ^^^^^^ keyword.return
+end
+# <- keyword.function