difftastic/rustdoc/difft/parse/tree_sitter_parser/index.html

13 lines
14 KiB
HTML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Load and configure parsers written with tree-sitter."><title>difft::parse::tree_sitter_parser - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-ac92e1bbe349e143.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="difft" data-themes="" data-resource-suffix="" data-rustdoc-version="1.76.0 (07dca489a 2024-02-04)" data-channel="1.76.0" data-search-js="search-2b6ce74ff89ae146.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-f2adc0d6ca4d09fb.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-305769736d49e732.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-feafe1bb7466e4bd.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../difft/index.html">difft</a><span class="version">0.68.0</span></h2></div><h2 class="location"><a href="#">Module tree_sitter_parser</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li><li><a href="#functions">Functions</a></li></ul></section><h2><a href="../index.html">In difft::parse</a></h2></div></nav><div class="sidebar-resizer"></div>
<main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../difft/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../../index.html">difft</a>::<wbr><a href="../index.html">parse</a>::<wbr><a class="mod" href="#">tree_sitter_parser</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../../src/difft/parse/tree_sitter_parser.rs.html#1-1895">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Load and configure parsers written with tree-sitter.</p>
</div></details><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.ExceededByteLimit.html" title="struct difft::parse::tree_sitter_parser::ExceededByteLimit">ExceededByteLimit</a><span title="Restricted Visibility">&nbsp;🔒</span> </div></li><li><div class="item-name"><a class="struct" href="struct.ExceededParseErrorLimit.html" title="struct difft::parse::tree_sitter_parser::ExceededParseErrorLimit">ExceededParseErrorLimit</a><span title="Restricted Visibility">&nbsp;🔒</span> </div></li><li><div class="item-name"><a class="struct" href="struct.HighlightedNodeIds.html" title="struct difft::parse::tree_sitter_parser::HighlightedNodeIds">HighlightedNodeIds</a><span title="Restricted Visibility">&nbsp;🔒</span> </div></li><li><div class="item-name"><a class="struct" href="struct.TreeSitterConfig.html" title="struct difft::parse::tree_sitter_parser::TreeSitterConfig">TreeSitterConfig</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="desc docblock-short">Configuration for a tree-sitter parser.</div></li><li><div class="item-name"><a class="struct" href="struct.TreeSitterSubLanguage.html" title="struct difft::parse::tree_sitter_parser::TreeSitterSubLanguage">TreeSitterSubLanguage</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="desc docblock-short">A language may contain certain nodes that are in other languages
and should be parsed as such (e.g. HTML <code>&lt;script&gt;</code> nodes
containing JavaScript). This struct describes how to identify such
nodes, and what languages we should parse them as.</div></li></ul><h2 id="constants" class="section-header"><a href="#constants">Constants</a></h2><ul class="item-table"><li><div class="item-name"><a class="constant" href="constant.OCAML_ATOM_NODES.html" title="constant difft::parse::tree_sitter_parser::OCAML_ATOM_NODES">OCAML_ATOM_NODES</a><span title="Restricted Visibility">&nbsp;🔒</span> </div></li></ul><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.all_syntaxes_from_cursor.html" title="fn difft::parse::tree_sitter_parser::all_syntaxes_from_cursor">all_syntaxes_from_cursor</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="desc docblock-short">Convert all the tree-sitter nodes at this level to difftastic
syntax nodes.</div></li><li><div class="item-name"><a class="fn" href="fn.atom_from_cursor.html" title="fn difft::parse::tree_sitter_parser::atom_from_cursor">atom_from_cursor</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="desc docblock-short">Convert the tree-sitter node at <code>cursor</code> to a difftastic atom.</div></li><li><div class="item-name"><a class="fn" href="fn.child_tokens.html" title="fn difft::parse::tree_sitter_parser::child_tokens">child_tokens</a><span title="Restricted Visibility">&nbsp;🔒</span> </div></li><li><div class="item-name"><a class="fn" href="fn.comment_positions.html" title="fn difft::parse::tree_sitter_parser::comment_positions">comment_positions</a><span title="Restricted Visibility">&nbsp;🔒</span> </div></li><li><div class="item-name"><a class="fn" href="fn.find_delim_positions.html" title="fn difft::parse::tree_sitter_parser::find_delim_positions">find_delim_positions</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="desc docblock-short">Are any of the children of the node at <code>cursor</code> delimiters? Return
their indexes if so.</div></li><li><div class="item-name"><a class="fn" href="fn.from_language.html" title="fn difft::parse::tree_sitter_parser::from_language">from_language</a><span title="Restricted Visibility">&nbsp;🔒</span> </div></li><li><div class="item-name"><a class="fn" href="fn.list_from_cursor.html" title="fn difft::parse::tree_sitter_parser::list_from_cursor">list_from_cursor</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="desc docblock-short">Convert the tree-sitter node at <code>cursor</code> to a difftastic list
node.</div></li><li><div class="item-name"><a class="fn" href="fn.parse.html" title="fn difft::parse::tree_sitter_parser::parse">parse</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="desc docblock-short">Parse <code>src</code> with tree-sitter and convert to difftastic Syntax.</div></li><li><div class="item-name"><a class="fn" href="fn.parse_subtrees.html" title="fn difft::parse::tree_sitter_parser::parse_subtrees">parse_subtrees</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="desc docblock-short">Find any nodes that can be parsed as other languages (e.g. JavaScript embedded in HTML),
and return a map of their node IDs mapped to parsed trees. Every time we see such a node,
we will ignore it and recurse into the root node of the given tree instead.</div></li><li><div class="item-name"><a class="fn" href="fn.print_cursor.html" title="fn difft::parse::tree_sitter_parser::print_cursor">print_cursor</a><span title="Restricted Visibility">&nbsp;🔒</span> </div></li><li><div class="item-name"><a class="fn" href="fn.print_tree.html" title="fn difft::parse::tree_sitter_parser::print_tree">print_tree</a><span title="Restricted Visibility">&nbsp;🔒</span> </div></li><li><div class="item-name"><a class="fn" href="fn.syntax_from_cursor.html" title="fn difft::parse::tree_sitter_parser::syntax_from_cursor">syntax_from_cursor</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="desc docblock-short">Convert the tree-sitter node at <code>cursor</code> to a difftastic syntax
node.</div></li><li><div class="item-name"><a class="fn" href="fn.to_syntax.html" title="fn difft::parse::tree_sitter_parser::to_syntax">to_syntax</a><span title="Restricted Visibility">&nbsp;🔒</span> </div></li><li><div class="item-name"><a class="fn" href="fn.to_syntax_with_limit.html" title="fn difft::parse::tree_sitter_parser::to_syntax_with_limit">to_syntax_with_limit</a><span title="Restricted Visibility">&nbsp;🔒</span> </div></li><li><div class="item-name"><a class="fn" href="fn.to_tree.html" title="fn difft::parse::tree_sitter_parser::to_tree">to_tree</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="desc docblock-short">Parse <code>src</code> with tree-sitter.</div></li><li><div class="item-name"><a class="fn" href="fn.to_tree_with_limit.html" title="fn difft::parse::tree_sitter_parser::to_tree_with_limit">to_tree_with_limit</a><span title="Restricted Visibility">&nbsp;🔒</span> </div></li><li><div class="item-name"><a class="fn" href="fn.tree_highlights.html" title="fn difft::parse::tree_sitter_parser::tree_highlights">tree_highlights</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="desc docblock-short">Calculate which tree-sitter node IDs should have which syntax
highlighting.</div></li><li><div class="item-name"><a class="fn" href="fn.tree_sitter_commonlisp.html" title="fn difft::parse::tree_sitter_parser::tree_sitter_commonlisp">tree_sitter_commonlisp</a><span title="Restricted Visibility">&nbsp;🔒</span> <sup title="unsafe function"></sup></div></li><li><div class="item-name"><a class="fn" href="fn.tree_sitter_elvish.html" title="fn difft::parse::tree_sitter_parser::tree_sitter_elvish">tree_sitter_elvish</a><span title="Restricted Visibility">&nbsp;🔒</span> <sup title="unsafe function"></sup></div></li><li><div class="item-name"><a class="fn" href="fn.tree_sitter_hack.html" title="fn difft::parse::tree_sitter_parser::tree_sitter_hack">tree_sitter_hack</a><span title="Restricted Visibility">&nbsp;🔒</span> <sup title="unsafe function"></sup></div></li><li><div class="item-name"><a class="fn" href="fn.tree_sitter_hare.html" title="fn difft::parse::tree_sitter_parser::tree_sitter_hare">tree_sitter_hare</a><span title="Restricted Visibility">&nbsp;🔒</span> <sup title="unsafe function"></sup></div></li><li><div class="item-name"><a class="fn" href="fn.tree_sitter_janet_simple.html" title="fn difft::parse::tree_sitter_parser::tree_sitter_janet_simple">tree_sitter_janet_simple</a><span title="Restricted Visibility">&nbsp;🔒</span> <sup title="unsafe function"></sup></div></li><li><div class="item-name"><a class="fn" href="fn.tree_sitter_kotlin.html" title="fn difft::parse::tree_sitter_parser::tree_sitter_kotlin">tree_sitter_kotlin</a><span title="Restricted Visibility">&nbsp;🔒</span> <sup title="unsafe function"></sup></div></li><li><div class="item-name"><a class="fn" href="fn.tree_sitter_latex.html" title="fn difft::parse::tree_sitter_parser::tree_sitter_latex">tree_sitter_latex</a><span title="Restricted Visibility">&nbsp;🔒</span> <sup title="unsafe function"></sup></div></li><li><div class="item-name"><a class="fn" href="fn.tree_sitter_perl.html" title="fn difft::parse::tree_sitter_parser::tree_sitter_perl">tree_sitter_perl</a><span title="Restricted Visibility">&nbsp;🔒</span> <sup title="unsafe function"></sup></div></li><li><div class="item-name"><a class="fn" href="fn.tree_sitter_scss.html" title="fn difft::parse::tree_sitter_parser::tree_sitter_scss">tree_sitter_scss</a><span title="Restricted Visibility">&nbsp;🔒</span> <sup title="unsafe function"></sup></div></li><li><div class="item-name"><a class="fn" href="fn.tree_sitter_smali.html" title="fn difft::parse::tree_sitter_parser::tree_sitter_smali">tree_sitter_smali</a><span title="Restricted Visibility">&nbsp;🔒</span> <sup title="unsafe function"></sup></div></li><li><div class="item-name"><a class="fn" href="fn.tree_sitter_vhdl.html" title="fn difft::parse::tree_sitter_parser::tree_sitter_vhdl">tree_sitter_vhdl</a><span title="Restricted Visibility">&nbsp;🔒</span> <sup title="unsafe function"></sup></div></li></ul></section></div></main></body></html>