This repository was archived by the owner on Oct 18, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
main/java/com/itsaky/androidide/treesitter
test/java/com/itsaky/androidide/treesitter Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -130,10 +130,6 @@ public long getTimeout() {
130130 * parse only a *portion* of a document but still return a syntax tree whose ranges match up with
131131 * the document as a whole. You can also pass multiple disjoint ranges.
132132 *
133- * <p>The second and third parameters specify the location and length of an array of ranges. The
134- * parser does *not* take ownership of these ranges; it copies the data, so it doesn't matter how
135- * these ranges are allocated.
136- *
137133 * <p>If the ranges parameter is an empty array, then the entire document will be parsed.
138134 * Otherwise, the given ranges must be ordered from earliest to latest in the document, and they
139135 * must not overlap. That is, the following must hold for all `i` < `length - 1`:
Original file line number Diff line number Diff line change 11package com .itsaky .androidide .treesitter ;
22
33import static com .google .common .truth .Truth .assertThat ;
4+ import static com .itsaky .androidide .treesitter .TSInputEncoding .TSInputEncodingUTF16 ;
5+ import static com .itsaky .androidide .treesitter .TestUtils .readString ;
6+ import static java .nio .file .Paths .get ;
47
58import org .junit .Test ;
69
@@ -14,8 +17,7 @@ public void testWalk() throws UnsupportedEncodingException {
1417 parser .setLanguage (TSLanguages .python ());
1518 try (TSTree tree =
1619 parser .parseString (
17- "def foo(bar, baz):\n print(bar)\n print(baz)" ,
18- TSInputEncoding .TSInputEncodingUTF16 )) {
20+ "def foo(bar, baz):\n print(bar)\n print(baz)" , TSInputEncodingUTF16 )) {
1921 try (TSTreeCursor cursor = tree .getRootNode ().walk ()) {
2022 assertThat (cursor .getCurrentTreeCursorNode ().getType ()).isEqualTo ("module" );
2123 assertThat (cursor .getCurrentNode ().getType ()).isEqualTo ("module" );
You can’t perform that action at this time.
0 commit comments