Struct darklua_core::nodes::FunctionStatement
source · pub struct FunctionStatement { /* private fields */ }
Implementations§
source§impl FunctionStatement
impl FunctionStatement
pub fn new( name: FunctionName, block: Block, parameters: Vec<Identifier>, is_variadic: bool ) -> Self
pub fn from_name<S: Into<String>, B: Into<Block>>(name: S, block: B) -> Self
pub fn with_tokens(self, tokens: FunctionStatementTokens) -> Self
pub fn set_tokens(&mut self, tokens: FunctionStatementTokens)
pub fn get_tokens(&self) -> Option<&FunctionStatementTokens>
pub fn with_parameter<S: Into<Identifier>>(self, parameter: S) -> Self
pub fn variadic(self) -> Self
pub fn get_block(&self) -> &Block
pub fn get_name(&self) -> &FunctionName
pub fn parameters_count(&self) -> usize
pub fn get_parameters(&self) -> &Vec<Identifier>
pub fn iter_parameters(&self) -> impl Iterator<Item = &Identifier>
pub fn is_variadic(&self) -> bool
pub fn mutate_block(&mut self) -> &mut Block
pub fn mutate_function_name(&mut self) -> &mut FunctionName
pub fn mutate_parameters(&mut self) -> &mut Vec<Identifier>
pub fn remove_method(&mut self)
pub fn has_parameters(&self) -> bool
pub fn clear_comments(&mut self)
pub fn clear_whitespaces(&mut self)
Trait Implementations§
source§impl Clone for FunctionStatement
impl Clone for FunctionStatement
source§fn clone(&self) -> FunctionStatement
fn clone(&self) -> FunctionStatement
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FunctionStatement
impl Debug for FunctionStatement
source§impl From<FunctionStatement> for Statement
impl From<FunctionStatement> for Statement
source§fn from(function: FunctionStatement) -> Statement
fn from(function: FunctionStatement) -> Statement
Converts to this type from the input type.
source§impl PartialEq<FunctionStatement> for FunctionStatement
impl PartialEq<FunctionStatement> for FunctionStatement
source§fn eq(&self, other: &FunctionStatement) -> bool
fn eq(&self, other: &FunctionStatement) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for FunctionStatement
impl StructuralEq for FunctionStatement
impl StructuralPartialEq for FunctionStatement
Auto Trait Implementations§
impl RefUnwindSafe for FunctionStatement
impl Send for FunctionStatement
impl Sync for FunctionStatement
impl Unpin for FunctionStatement
impl UnwindSafe for FunctionStatement
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
§fn extract_context(self, _original_input: I)
fn extract_context(self, _original_input: I)
Given the context attached to a nom error, and given the original
input to the nom parser, extract more the useful context information. Read more
§impl<I> RecreateContext<I> for I
impl<I> RecreateContext<I> for I
§fn recreate_context(_original_input: I, tail: I) -> I
fn recreate_context(_original_input: I, tail: I) -> I
Given the original input, as well as the context reported by nom,
recreate a context in the original string where the error occurred. Read more