Language

Trait Language 

Source
pub trait Language {
Show 46 methods // Required methods fn name(&self) -> &str; fn self_keyword(&self) -> Option<&str>; fn if_nodes(&self) -> Vec<&str>; fn switch_nodes(&self) -> Vec<&str>; fn case_nodes(&self) -> Vec<&str>; fn loop_nodes(&self) -> Vec<&str>; fn jump_nodes(&self) -> Vec<&str>; fn return_nodes(&self) -> Vec<&str>; fn binary_nodes(&self) -> Vec<&str>; fn field_nodes(&self) -> Vec<&str>; fn call_nodes(&self) -> Vec<&str>; fn function_nodes(&self) -> Vec<&str>; fn closure_nodes(&self) -> Vec<&str>; fn comment_nodes(&self) -> Vec<&str>; fn string_nodes(&self) -> Vec<&str>; fn boolean_operator_nodes(&self) -> Vec<&str>; fn call_identifiers( &self, source_file: &File, node: &Node<'_>, ) -> (Option<String>, String); fn field_identifiers( &self, source_file: &File, node: &Node<'_>, ) -> (String, String); fn tree_sitter_language(&self) -> Language; fn class_query(&self) -> &Query; fn function_declaration_query(&self) -> &Query; fn field_query(&self) -> &Query; // Provided methods fn invisible_container_nodes(&self) -> Vec<&str> { ... } fn elsif_nodes(&self) -> Vec<&str> { ... } fn else_nodes(&self) -> Vec<&str> { ... } fn ternary_nodes(&self) -> Vec<&str> { ... } fn except_nodes(&self) -> Vec<&str> { ... } fn try_expression_nodes(&self) -> Vec<&str> { ... } fn conditional_assignment_nodes(&self) -> Vec<&str> { ... } fn block_nodes(&self) -> Vec<&str> { ... } fn constructor_names(&self) -> Vec<&str> { ... } fn destructor_names(&self) -> Vec<&str> { ... } fn is_decorator_function(&self, _node: &Node<'_>) -> bool { ... } fn is_instance_method(&self, _file: &File, _node: &Node<'_>) -> bool { ... } fn is_jump_label(&self, _node: &Node<'_>) -> bool { ... } fn all_operators(&self) -> Vec<&str> { ... } fn all_operands(&self) -> Vec<&str> { ... } fn iterator_method_identifiers(&self) -> Vec<&str> { ... } fn implementation_query(&self) -> Option<&Query> { ... } fn has_labeled_jumps(&self) -> bool { ... } fn query(&self, query_source: &str) -> Query { ... } fn parser(&self) -> Parser { ... } fn has_field_names(&self) -> bool { ... } fn sanitize_parameter_name(&self, parameter_name: String) -> Option<String> { ... } fn get_parameter_names( &self, parameters_node: Node<'_>, source_file: &Arc<File>, ) -> Vec<String> { ... } fn function_name_node<'a>(&'a self, node: &'a Node<'_>) -> Node<'a> { ... }
}

Required Methods§

Source

fn name(&self) -> &str

Source

fn self_keyword(&self) -> Option<&str>

Source

fn if_nodes(&self) -> Vec<&str>

Source

fn switch_nodes(&self) -> Vec<&str>

Source

fn case_nodes(&self) -> Vec<&str>

Source

fn loop_nodes(&self) -> Vec<&str>

Source

fn jump_nodes(&self) -> Vec<&str>

Source

fn return_nodes(&self) -> Vec<&str>

Source

fn binary_nodes(&self) -> Vec<&str>

Source

fn field_nodes(&self) -> Vec<&str>

Source

fn call_nodes(&self) -> Vec<&str>

Source

fn function_nodes(&self) -> Vec<&str>

Source

fn closure_nodes(&self) -> Vec<&str>

Source

fn comment_nodes(&self) -> Vec<&str>

Source

fn string_nodes(&self) -> Vec<&str>

Source

fn boolean_operator_nodes(&self) -> Vec<&str>

Source

fn call_identifiers( &self, source_file: &File, node: &Node<'_>, ) -> (Option<String>, String)

Source

fn field_identifiers( &self, source_file: &File, node: &Node<'_>, ) -> (String, String)

Source

fn tree_sitter_language(&self) -> Language

Source

fn class_query(&self) -> &Query

Source

fn function_declaration_query(&self) -> &Query

Source

fn field_query(&self) -> &Query

Provided Methods§

Source

fn invisible_container_nodes(&self) -> Vec<&str>

Source

fn elsif_nodes(&self) -> Vec<&str>

Source

fn else_nodes(&self) -> Vec<&str>

Source

fn ternary_nodes(&self) -> Vec<&str>

Source

fn except_nodes(&self) -> Vec<&str>

Source

fn try_expression_nodes(&self) -> Vec<&str>

Source

fn conditional_assignment_nodes(&self) -> Vec<&str>

Source

fn block_nodes(&self) -> Vec<&str>

Source

fn constructor_names(&self) -> Vec<&str>

Source

fn destructor_names(&self) -> Vec<&str>

Source

fn is_decorator_function(&self, _node: &Node<'_>) -> bool

Source

fn is_instance_method(&self, _file: &File, _node: &Node<'_>) -> bool

Source

fn is_jump_label(&self, _node: &Node<'_>) -> bool

Source

fn all_operators(&self) -> Vec<&str>

Source

fn all_operands(&self) -> Vec<&str>

Source

fn iterator_method_identifiers(&self) -> Vec<&str>

Source

fn implementation_query(&self) -> Option<&Query>

Source

fn has_labeled_jumps(&self) -> bool

Source

fn query(&self, query_source: &str) -> Query

Source

fn parser(&self) -> Parser

Source

fn has_field_names(&self) -> bool

Source

fn sanitize_parameter_name(&self, parameter_name: String) -> Option<String>

Source

fn get_parameter_names( &self, parameters_node: Node<'_>, source_file: &Arc<File>, ) -> Vec<String>

Source

fn function_name_node<'a>(&'a self, node: &'a Node<'_>) -> Node<'a>

Trait Implementations§

Source§

impl Debug for dyn Language

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for dyn Language

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Implementors§