diff --git a/glean/lang/codemarkup/tests/hack/cases/xrefs/declarationnamespace.out b/glean/lang/codemarkup/tests/hack/cases/xrefs/declarationnamespace.out new file mode 100644 index 000000000..98132eca3 --- /dev/null +++ b/glean/lang/codemarkup/tests/hack/cases/xrefs/declarationnamespace.out @@ -0,0 +1,23 @@ +[ + "@generated", + { + "key": { + "declaration": { + "method": { + "key": { + "name": { "key": "bar" }, + "container": { + "class_": { + "key": { + "name": { "key": { "name": { "key": "SourceClass" } } } + } + } + } + } + } + }, + "file": { "key": "www/SourceClass.php" }, + "span": { "start": 408, "length": 3 } + } + } +] \ No newline at end of file diff --git a/glean/lang/codemarkup/tests/hack/cases/xrefs/declarationnamespace.perf b/glean/lang/codemarkup/tests/hack/cases/xrefs/declarationnamespace.perf new file mode 100644 index 000000000..602582a92 --- /dev/null +++ b/glean/lang/codemarkup/tests/hack/cases/xrefs/declarationnamespace.perf @@ -0,0 +1,8 @@ +{ + "@generated": null, + "hack.ClassDeclaration.6": 1, + "hack.DeclarationLocation.6": 1, + "hack.MethodDeclaration.6": 1, + "hack.Name.6": 6, + "hack.QName.6": 3 +} \ No newline at end of file diff --git a/glean/lang/codemarkup/tests/hack/cases/xrefs/declarationnamespace.query b/glean/lang/codemarkup/tests/hack/cases/xrefs/declarationnamespace.query new file mode 100644 index 000000000..0e0d9fe64 --- /dev/null +++ b/glean/lang/codemarkup/tests/hack/cases/xrefs/declarationnamespace.query @@ -0,0 +1,33 @@ +query: | + hack.DeclarationLocation + { + declaration = { + method = hack.MethodDeclaration.6 { + name="bar", + container = { + class_ = hack.ClassDeclaration.6 { + name = hack.QName.6 { + name = "SourceClass", + namespace_ = {nothing={}} + } + } + } | { + interface_ = hack.InterfaceDeclaration.6 { + name=hack.QName.6 { + name = "SourceClass", + namespace_={nothing={}} + } + } + } | { + trait = hack.TraitDeclaration.6 { + name = hack.QName.6 { + name = "SourceClass", + namespace_ = {nothing={}} + } + } + } + } + } + } +perf: true +transform: [gensort, []]