Enum ezno_parser::functions::FunctionHeader
source · pub enum FunctionHeader {
VirginFunctionHeader {
async_keyword: Option<Keyword<Async>>,
function_keyword: Keyword<Function>,
generator_star_token_pos: Option<Span>,
},
ChadFunctionHeader {
async_keyword: Option<Keyword<Async>>,
generator_keyword: Option<Keyword<Generator>>,
function_keyword: Keyword<Function>,
},
}
Variants§
Implementations§
Trait Implementations§
source§impl ASTNode for FunctionHeader
impl ASTNode for FunctionHeader
source§fn get_position(&self) -> Cow<'_, Span>
fn get_position(&self) -> Cow<'_, Span>
Returns position of node as span AS IT WAS PARSED. May be none if AST was doesn’t match anything in source
fn from_reader( reader: &mut impl TokenReader<TSXToken, Span>, _state: &mut ParsingState, _settings: &ParseSettings ) -> ParseResult<Self>
fn to_string_from_buffer<T: ToString>( &self, buf: &mut T, _settings: &ToStringSettingsAndData, _depth: u8 )
source§fn from_string(
source: String,
settings: ParseSettings,
source_id: SourceId,
offset: Option<usize>,
cursors: Vec<(usize, EmptyCursorId)>
) -> ParseResult<ParseOutput<Self>>
fn from_string( source: String, settings: ParseSettings, source_id: SourceId, offset: Option<usize>, cursors: Vec<(usize, EmptyCursorId)> ) -> ParseResult<ParseOutput<Self>>
From string, with default impl to call abstract method from_reader
source§fn to_string(&self, settings: &ToStringSettingsAndData) -> String
fn to_string(&self, settings: &ToStringSettingsAndData) -> String
Returns structure as valid string
source§impl Clone for FunctionHeader
impl Clone for FunctionHeader
source§fn clone(&self) -> FunctionHeader
fn clone(&self) -> FunctionHeader
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 FunctionHeader
impl Debug for FunctionHeader
source§impl PartialEq<FunctionHeader> for FunctionHeader
impl PartialEq<FunctionHeader> for FunctionHeader
source§fn eq(&self, other: &FunctionHeader) -> bool
fn eq(&self, other: &FunctionHeader) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.