Skip to main content

TypescriptCode

Struct TypescriptCode 

Source
pub struct TypescriptCode { /* private fields */ }

Trait Implementations§

Source§

impl Abc for TypescriptCode

Source§

fn compute(_node: &Node<'_>, _stats: &mut Stats)

Source§

impl Alterator for TypescriptCode

Source§

fn alterate( node: &Node<'_>, code: &[u8], span: bool, children: Vec<AstNode>, ) -> AstNode

Creates a new AST node containing the code associated to the node, its span, and its children. Read more
Source§

fn get_text_span( node: &Node<'_>, code: &[u8], span: bool, text: bool, ) -> (String, Span)

Gets the code as text and the span associated to a node.
Source§

fn get_default( node: &Node<'_>, code: &[u8], span: bool, children: Vec<AstNode>, ) -> AstNode

Gets a default AST node containing the code associated to the node, its span, and its children.
Source§

fn get_ast_node( node: &Node<'_>, code: &[u8], children: Vec<AstNode>, span: bool, comment: bool, ) -> Option<AstNode>

Gets a new AST node if and only if the code is not a comment, otherwise None is returned.
Source§

impl Cognitive for TypescriptCode

Source§

fn compute( node: &Node<'_>, stats: &mut Stats, nesting_map: &mut HashMap<usize, (usize, usize, usize)>, )

Source§

impl Cyclomatic for TypescriptCode

Source§

fn compute(node: &Node<'_>, stats: &mut Stats)

Source§

impl Exit for TypescriptCode

Source§

fn compute(node: &Node<'_>, stats: &mut Stats)

Source§

impl Halstead for TypescriptCode

Source§

fn compute<'a>( node: &Node<'a>, code: &'a [u8], halstead_maps: &mut HalsteadMaps<'a>, )

Source§

impl LanguageInfo for TypescriptCode

Source§

type BaseLang = Typescript

Source§

fn get_lang() -> LANG

Source§

fn get_lang_name() -> &'static str

Source§

impl Loc for TypescriptCode

Source§

fn compute( node: &Node<'_>, stats: &mut Stats, is_func_space: bool, is_unit: bool, )

Source§

impl Mi for TypescriptCode

Source§

fn compute(loc: &Stats, cyclomatic: &Stats, halstead: &Stats, stats: &mut Stats)

Source§

impl NArgs for TypescriptCode

Source§

fn compute(node: &Node<'_>, stats: &mut Stats)

Source§

impl Nom for TypescriptCode

Source§

fn compute(node: &Node<'_>, stats: &mut Stats)

Source§

impl Npa for TypescriptCode

Source§

fn compute(_node: &Node<'_>, _stats: &mut Stats)

Source§

impl Npm for TypescriptCode

Source§

fn compute(_node: &Node<'_>, _stats: &mut Stats)

Source§

impl Wmc for TypescriptCode

Source§

fn compute(_space_kind: SpaceKind, _cyclomatic: &Stats, _stats: &mut Stats)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.