Skip to content

Commit

Permalink
fix: add missing object_creation_expression identifier extractor
Browse files Browse the repository at this point in the history
  • Loading branch information
jpedroh committed Sep 13, 2024
1 parent 6d024c2 commit 2cd0b0c
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
public class GitHubBuilder {
public GitHubBuilder withProxy(final Proxy p) {
return withConnector(new HttpConnector() {
public HttpURLConnection connect(URL url) throws IOException {
return (HttpURLConnection) url.openConnection(p);
}
});
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
public class GitHubBuilder {
private String a;

public GitHubBuilder withProxy(final Proxy p) {
return withConnector(new HttpConnector() {
public HttpURLConnection connect(URL url) throws IOException {
return (HttpURLConnection) url.openConnection(p);
}
});
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
public class GitHubBuilder { private String a ; public GitHubBuilder withProxy ( final Proxy p ) { return withConnector ( new ImpatientHttpConnector ( new HttpConnector ( ) { public HttpURLConnection connect ( URL url ) throws IOException { return ( HttpURLConnection ) url . openConnection ( p ) ; } } ) ) ; } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
public class GitHubBuilder {
public GitHubBuilder withProxy(final Proxy p) {
return withConnector(new ImpatientHttpConnector(new HttpConnector() {
public HttpURLConnection connect(URL url) throws IOException {
return (HttpURLConnection) url.openConnection(p);
}
}));
}
}
8 changes: 8 additions & 0 deletions parsing/src/tree_sitter_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@ impl From<Language> for ParserConfiguration {
tree_sitter_java::language(),
)),
);

map.insert(
"object_creation_expression",
Box::new(TreeSitterQuery::new(
r#"(object_creation_expression (type_identifier) @type_identifier)"#,
tree_sitter_java::language(),
)),
);
map
},
},
Expand Down

0 comments on commit 2cd0b0c

Please sign in to comment.