-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Java #1
Conversation
/// Common functionality for any type indicating a section of bytes to extract from [`Content`]. | ||
pub trait ByteCoordinate { | ||
/// The byte offset at which the function starts. | ||
fn byte_start(&self) -> usize; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Optional] use https://doc.rust-lang.org/std/ops/struct.Range.html instead, to get start <= x
and start <= end
guarantee
tests/it/language/java_11.rs
Outdated
|
||
use crate::include_str_lf; | ||
|
||
// #[test] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Prefer] Let's kill dead comments or add one-two line explaining why we are keeping this test commented!
import java.util.HashMap; | ||
import java.util.logging.Logger; | ||
|
||
public class TestFunctions { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Optional, Minor] Let's add interface, so it's explicitly part of our test scenario.
@@ -0,0 +1,9 @@ | |||
//! Higher level parsers and constants on top of tree-sitter primitives. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Optional] Let's add doc url, on where we are getting these symbol tag names. I think they are coming from vendored node-types.json
, according to: https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types
Overview
Adds support for Java snippet extraction and refactors the library a bit.
Acceptance criteria
Users can extract Java function snippets from source code.
Testing plan
Covered well by automated tests; I ran those.
Risks
None
References
https://fossa.atlassian.net/browse/ANE-1293
Checklist