mirror of
https://github.com/stevearc/aerial.nvim
synced 2024-09-16 14:34:08 +02:00
Added USD related queries and tests
This commit is contained in:
parent
f9247b41aa
commit
a3c227e681
3 changed files with 42 additions and 10 deletions
|
@ -4,29 +4,23 @@
|
|||
(#set! "kind" "Class")
|
||||
) @type
|
||||
|
||||
(prim_definition
|
||||
(string) @name
|
||||
(#offset! @name 0 1 0 -1)
|
||||
(#set! "kind" "Class")
|
||||
) @type
|
||||
|
||||
(attribute_assignment
|
||||
(identifier) @name
|
||||
[(identifier) (qualified_identifier)] @name
|
||||
(#set! "kind" "Property")
|
||||
) @type
|
||||
|
||||
(attribute_declaration
|
||||
(identifier) @name
|
||||
[(identifier) (qualified_identifier)] @name
|
||||
(#set! "kind" "Property")
|
||||
) @type
|
||||
|
||||
(relationship_assignment
|
||||
(identifier) @name
|
||||
[(identifier) (qualified_identifier)] @name
|
||||
(#set! "kind" "Property")
|
||||
) @type
|
||||
|
||||
(relationship_declaration
|
||||
(identifier) @name
|
||||
[(identifier) (qualified_identifier)] @name
|
||||
(#set! "kind" "Property")
|
||||
) @type
|
||||
|
||||
|
|
17
tests/treesitter/usd_spec.lua
Normal file
17
tests/treesitter/usd_spec.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
local util = require("tests.test_util")
|
||||
|
||||
describe("treesitter USD", function()
|
||||
it("parses all symbols correctly", function()
|
||||
util.test_file_symbols("treesitter", "./tests/treesitter/usd_test.usd", {
|
||||
{
|
||||
kind = "Class",
|
||||
name = "something",
|
||||
level = 0,
|
||||
lnum = 3,
|
||||
col = 0,
|
||||
end_lnum = 4,
|
||||
end_col = 8,
|
||||
},
|
||||
})
|
||||
end)
|
||||
end)
|
21
tests/treesitter/usd_test.usd
Normal file
21
tests/treesitter/usd_test.usd
Normal file
|
@ -0,0 +1,21 @@
|
|||
#usda 1.0
|
||||
|
||||
def Xform "something" (
|
||||
kind = "component"
|
||||
)
|
||||
{
|
||||
def Xform "child"
|
||||
{
|
||||
float3 foo:xformOp:rotateXYZ = (-15.7, -55.8, 0.3)
|
||||
double3 translate = (153.2, 119.3, 24.7)
|
||||
uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ"]
|
||||
|
||||
variantSet "variants" = {
|
||||
"default" {
|
||||
}
|
||||
"one" {
|
||||
double3 xformOp:translate = (10, 10, 10)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue