Type Alias ezno_parser::declarations::classes::ClassFunction
source · pub type ClassFunction = FunctionBase<ClassFunctionBase>;Aliased Type§
struct ClassFunction {
pub header: (Option<Keyword<Async>>, GetSetGeneratorOrNone),
pub name: WithComment<PropertyKey<PublicOrPrivate>>,
pub type_parameters: Option<Vec<GenericTypeConstraint, Global>>,
pub parameters: FunctionParameters,
pub return_type: Option<TypeAnnotation>,
pub body: Block,
pub position: BaseSpan<()>,
}Fields§
§header: (Option<Keyword<Async>>, GetSetGeneratorOrNone)§name: WithComment<PropertyKey<PublicOrPrivate>>§type_parameters: Option<Vec<GenericTypeConstraint, Global>>§parameters: FunctionParameters§return_type: Option<TypeAnnotation>§body: Block§position: BaseSpan<()>Trait Implementations§
source§impl<T: FunctionBased + 'static> ASTNode for FunctionBase<T>
impl<T: FunctionBased + 'static> ASTNode for FunctionBase<T>
fn from_reader( reader: &mut impl TokenReader<TSXToken, TokenStart>, state: &mut ParsingState, settings: &ParseOptions ) -> ParseResult<Self>
fn to_string_from_buffer<TS: ToString>( &self, buf: &mut TS, settings: &ToStringOptions, depth: u8 )
source§fn get_position(&self) -> &Span
fn get_position(&self) -> &Span
Returns position of node as span AS IT WAS PARSED. May be Span::NULL if AST was doesn’t match anything in source
source§fn from_string(
script: String,
options: ParseOptions,
source: SourceId,
offset: Option<u32>
) -> ParseResult<Self>
fn from_string( script: String, options: ParseOptions, source: SourceId, offset: Option<u32> ) -> ParseResult<Self>
From string, with default impl to call abstract method from_reader
source§fn to_string(&self, settings: &ToStringOptions) -> String
fn to_string(&self, settings: &ToStringOptions) -> String
Returns structure as valid string
source§impl<T: Clone + FunctionBased> Clone for FunctionBase<T>where
T::Header: Clone,
T::Name: Clone,
T::Body: Clone,
impl<T: Clone + FunctionBased> Clone for FunctionBase<T>where T::Header: Clone, T::Name: Clone, T::Body: Clone,
source§fn clone(&self) -> FunctionBase<T>
fn clone(&self) -> FunctionBase<T>
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<T: Debug + FunctionBased> Debug for FunctionBase<T>where
T::Header: Debug,
T::Name: Debug,
T::Body: Debug,
impl<T: Debug + FunctionBased> Debug for FunctionBase<T>where T::Header: Debug, T::Name: Debug, T::Body: Debug,
source§impl<T: FunctionBased> GetFieldByType<BaseSpan<()>> for FunctionBase<T>
impl<T: FunctionBased> GetFieldByType<BaseSpan<()>> for FunctionBase<T>
source§impl<T: FunctionBased> PartialEq<FunctionBase<T>> for FunctionBase<T>where
T::Header: PartialEq,
T::Name: PartialEq,
T::Body: PartialEq,
impl<T: FunctionBased> PartialEq<FunctionBase<T>> for FunctionBase<T>where T::Header: PartialEq, T::Name: PartialEq, T::Body: PartialEq,
source§impl<T: FunctionBased> SelfRustTokenize for FunctionBase<T>where
T::Header: SelfRustTokenize,
T::Name: SelfRustTokenize,
T::Body: SelfRustTokenize,
impl<T: FunctionBased> SelfRustTokenize for FunctionBase<T>where T::Header: SelfRustTokenize, T::Name: SelfRustTokenize, T::Body: SelfRustTokenize,
fn append_to_token_stream(&self, token_stream: &mut TokenStream)
source§fn to_tokens(&self) -> TokenStream
fn to_tokens(&self) -> TokenStream
Returns the tokens used to construct self
source§impl<T: FunctionBased> Serialize for FunctionBase<T>where
T::Header: Serialize,
T::Name: Serialize,
T::Body: Serialize,
impl<T: FunctionBased> Serialize for FunctionBase<T>where T::Header: Serialize, T::Name: Serialize, T::Body: Serialize,
source§impl<T: FunctionBased> Visitable for FunctionBase<T>where
T::Body: Visitable,
impl<T: FunctionBased> Visitable for FunctionBase<T>where T::Body: Visitable,
Visiting logic: TODO make visiting macro better and remove