Struct muse_lang::compiler::syntax::FunctionDefinition
source · pub struct FunctionDefinition {
pub visibility: Option<Ranged<Symbol>>,
pub fn: Ranged<Token>,
pub name: Option<Ranged<Symbol>>,
pub body: Ranged<Matches>,
}Expand description
The syntax components of a function definition.
Fields§
§visibility: Option<Ranged<Symbol>>The pub keyword.
fn: Ranged<Token>The fn keyword.
name: Option<Ranged<Symbol>>The name of the function.
body: Ranged<Matches>The body of the function.
Trait Implementations§
source§impl Clone for FunctionDefinition
impl Clone for FunctionDefinition
source§fn clone(&self) -> FunctionDefinition
fn clone(&self) -> FunctionDefinition
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 FunctionDefinition
impl Debug for FunctionDefinition
source§impl PartialEq for FunctionDefinition
impl PartialEq for FunctionDefinition
source§impl TokenizeInto for FunctionDefinition
impl TokenizeInto for FunctionDefinition
impl StructuralPartialEq for FunctionDefinition
Auto Trait Implementations§
impl Freeze for FunctionDefinition
impl RefUnwindSafe for FunctionDefinition
impl Send for FunctionDefinition
impl Sync for FunctionDefinition
impl Unpin for FunctionDefinition
impl UnwindSafe for FunctionDefinition
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<A> Cast for A
impl<A> Cast for A
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> TokenizeRanged for Twhere
T: TokenizeInto,
impl<T> TokenizeRanged for Twhere
T: TokenizeInto,
source§fn tokenize_ranged(
&self,
_range: SourceRange,
tokens: &mut VecDeque<Ranged<Token>>,
)
fn tokenize_ranged( &self, _range: SourceRange, tokens: &mut VecDeque<Ranged<Token>>, )
Tokenize
self into tokens within the enclosing range.