@@ -32,7 +32,7 @@ impl HoveredNode {
3232 let under_cursor = ctx. node_under_cursor . as_ref ( ) ?;
3333
3434 match under_cursor. kind ( ) {
35- "identifier "
35+ "any_identifier "
3636 if ctx. matches_ancestor_history ( & [ "relation" , "object_reference" ] )
3737 || ctx
3838 . matches_ancestor_history ( & [ "grantable_on_table" , "object_reference" ] ) =>
@@ -52,7 +52,7 @@ impl HoveredNode {
5252 }
5353 }
5454
55- "identifier "
55+ "any_identifier "
5656 if ctx. matches_ancestor_history ( & [ "object_reference" ] )
5757 && ctx. wrapping_clause_type . as_ref ( ) . is_some_and ( |clause| {
5858 matches ! (
@@ -73,7 +73,7 @@ impl HoveredNode {
7373 }
7474 }
7575
76- "identifier " if ctx. matches_ancestor_history ( & [ "field" ] ) => {
76+ "any_identifier " if ctx. matches_ancestor_history ( & [ "field" ] ) => {
7777 if let Some ( table_or_alias) = ctx. schema_or_alias_name . as_ref ( ) {
7878 Some ( HoveredNode :: Column ( NodeIdentification :: SchemaAndName ( (
7979 table_or_alias. clone ( ) ,
@@ -84,7 +84,9 @@ impl HoveredNode {
8484 }
8585 }
8686
87- "identifier" if ctx. matches_ancestor_history ( & [ "invocation" , "object_reference" ] ) => {
87+ "any_identifier"
88+ if ctx. matches_ancestor_history ( & [ "invocation" , "object_reference" ] ) =>
89+ {
8890 if let Some ( schema) = ctx. schema_or_alias_name . as_ref ( ) {
8991 Some ( HoveredNode :: Function ( NodeIdentification :: SchemaAndName ( (
9092 schema. clone ( ) ,
@@ -97,20 +99,9 @@ impl HoveredNode {
9799 }
98100 }
99101
100- "identifier"
101- if ctx. matches_one_of_ancestors ( & [
102- "alter_role" ,
103- "policy_to_role" ,
104- "role_specification" ,
105- ] ) || ctx. before_cursor_matches_kind ( & [ "keyword_revoke" ] ) =>
106- {
107- Some ( HoveredNode :: Role ( NodeIdentification :: Name ( node_content) ) )
108- }
109- "grant_role" | "policy_role" => {
110- Some ( HoveredNode :: Role ( NodeIdentification :: Name ( node_content) ) )
111- }
102+ "role_identifier" => Some ( HoveredNode :: Role ( NodeIdentification :: Name ( node_content) ) ) ,
112103
113- "identifier "
104+ "any_identifier "
114105 if (
115106 // hover over custom type in `create table` or `returns`
116107 ( ctx. matches_ancestor_history ( & [ "type" , "object_reference" ] )
@@ -145,17 +136,6 @@ impl HoveredNode {
145136 Some ( HoveredNode :: Column ( NodeIdentification :: Name ( node_content) ) )
146137 }
147138
148- "grant_table" => {
149- if let Some ( schema) = ctx. schema_or_alias_name . as_ref ( ) {
150- Some ( HoveredNode :: Table ( NodeIdentification :: SchemaAndName ( (
151- schema. clone ( ) ,
152- node_content,
153- ) ) ) )
154- } else {
155- Some ( HoveredNode :: Table ( NodeIdentification :: Name ( node_content) ) )
156- }
157- }
158-
159139 _ => None ,
160140 }
161141 }
0 commit comments