pub struct JavaScriptStrategy {
pub is_typescript: bool,
}Fields§
§is_typescript: boolImplementations§
Source§impl JavaScriptStrategy
impl JavaScriptStrategy
pub fn javascript() -> Self
pub fn typescript() -> Self
Trait Implementations§
Source§impl ChunkingStrategy for JavaScriptStrategy
impl ChunkingStrategy for JavaScriptStrategy
Source§fn semantic_node_types(&self) -> &[&str]
fn semantic_node_types(&self) -> &[&str]
Get the node types that represent semantic boundaries
Source§fn extract_chunks(
&self,
source: &str,
root: Node<'_>,
) -> Result<Vec<SemanticChunk>>
fn extract_chunks( &self, source: &str, root: Node<'_>, ) -> Result<Vec<SemanticChunk>>
Extract chunks from the source given the AST root
Source§fn chunk_type_for_node(&self, node: Node<'_>) -> ChunkType
fn chunk_type_for_node(&self, node: Node<'_>) -> ChunkType
Determine chunk type from AST node
Auto Trait Implementations§
impl Freeze for JavaScriptStrategy
impl RefUnwindSafe for JavaScriptStrategy
impl Send for JavaScriptStrategy
impl Sync for JavaScriptStrategy
impl Unpin for JavaScriptStrategy
impl UnwindSafe for JavaScriptStrategy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more