mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(julia): add tests for new changes
This commit is contained in:
parent
1012dd957e
commit
ffa6efa7f5
1 changed files with 26 additions and 0 deletions
26
tests/query/highlights/julia/test.jl
Normal file
26
tests/query/highlights/julia/test.jl
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue