From dfc4bb4d80b2dd841bcc4756bb5b18342adeb827 Mon Sep 17 00:00:00 2001 From: Joao Duarte Date: Thu, 12 Sep 2024 22:57:53 -0300 Subject: [PATCH] feat: add identifier extractos for annotations --- parsing/src/tree_sitter_parser.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/parsing/src/tree_sitter_parser.rs b/parsing/src/tree_sitter_parser.rs index 124b516..d68bf7f 100644 --- a/parsing/src/tree_sitter_parser.rs +++ b/parsing/src/tree_sitter_parser.rs @@ -99,6 +99,22 @@ impl From for ParserConfiguration { tree_sitter_java::language(), )), ); + + map.insert( + "marker_annotation", + Box::new(TreeSitterQuery::new( + r#"(marker_annotation name: _ @name)"#, + tree_sitter_java::language(), + )), + ); + + map.insert( + "annotation", + Box::new(TreeSitterQuery::new( + r#"(annotation name: _ @name)"#, + tree_sitter_java::language(), + )), + ); map }, },