File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
src/main/java/io/github/treesitter/jtreesitter Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -59,12 +59,9 @@ private static UnsatisfiedLinkError unresolved(String name) {
5959 * <h4 id="load-example">Example</h4>
6060 *
6161 * <p>{@snippet lang="java" :
62- * Language language;
63- * try (Arena arena = Arena.ofConfined()) {
64- * String library = System.mapLibraryName("tree-sitter-java");
65- * SymbolLookup symbols = SymbolLookup.libraryLookup(library, arena);
66- * language = Language.load(symbols, "tree_sitter_java");
67- * }
62+ * String library = System.mapLibraryName("tree-sitter-java");
63+ * SymbolLookup symbols = SymbolLookup.libraryLookup(library, Arena.global());
64+ * Language language = Language.load(symbols, "tree_sitter_java");
6865 * }
6966 *
7067 * @throws RuntimeException If the language could not be loaded.
Original file line number Diff line number Diff line change 3030 * }
3131 * }
3232 *}
33+ *
34+ * @see <a href="https://github.com/openjdk/jextract/blob/master/doc/GUIDE.md#library-loading">Library Loading</a>
3335 */
3436package io .github .treesitter .jtreesitter ;
You can’t perform that action at this time.
0 commit comments