Chris Thunes
Chris Thunes
There isn't a single method which will work for _all_ snippets, but if you know what kind of snippet you have (e.g. a method declaration, expression, etc.) there is usually...
This behavior looks correct to me. The above program, after Unicode escape processing is, ```java class Foo { String bar = """; } ``` and the error you are receiving...
Thanks for the contribution @akashdepth! I'm a bit swamped with other work at the moment so I won't be able to get to this right away. Feel free to bump...
Try `parse_compilation_unit()` instead. Imports statements are only allowed in a ["compilation unit"](https://docs.oracle.com/javase/specs/jls/se8/html/jls-7.html#jls-7.3) which is what a complete `.java` file corresponds to. A ["member declaration"](https://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html#jls-ClassMemberDeclaration) is a declaration within a class...
The set of prefix and postfix unary operators should be available on `Primary` expressions. You should be able to access these as `prefix_operators` and `postfix_operators` on `operandl` and `operandr` from...
This is indicated by the `dimensions` field of `ReferenceType` (inherited from `Type`). Here's an example, ```python import javalang ast = javalang.parse.parse_member_signature('public static void main(String args) {}') print ast.parameters[0].type.dimensions # []...
Unfortunately, no. There isn't support for rendering an AST or sub-tree back to Java code at the moment. I don't think this would be too difficult to implement though (some...
Apologies for not responding sooner. I'm glad to hear that javalang has been helpful! I think the approach I would take with this would be to first update the parser...
Another user needed the position information in a couple of limited cases. I filed this issue to follow up that change with more complete support. I would absolutely like this...
The syntax error is here, > `new Integer{loc_x,loc_y,dst_x,dst_y}` I suspect what was intended is, > `new Integer[]{loc_x,loc_y,dst_x,dst_y}`