Enum lunarity_ast::ImportDirective
source · pub enum ImportDirective<'ast> {
Global {
source: Node<'ast, StringLiteral<'ast>>,
alias: Option<IdentifierNode<'ast>>,
},
From {
symbol: Option<IdentifierNode<'ast>>,
alias: Option<IdentifierNode<'ast>>,
source: Node<'ast, StringLiteral<'ast>>,
},
ManyFrom {
imports: NodeList<'ast, Import<'ast>>,
source: Node<'ast, StringLiteral<'ast>>,
},
}
Variants§
Global
‘import’ StringLiteral (‘as’ Identifier)? ‘;’
From
Fields
§
symbol: Option<IdentifierNode<'ast>>
§
alias: Option<IdentifierNode<'ast>>
§
source: Node<'ast, StringLiteral<'ast>>
‘import’ (‘*’ | Identifier) (‘as’ Identifier)? ‘from’ StringLiteral ‘;’
ManyFrom
‘import’ ‘{’ Identifier (‘as’ Identifier)? ( ‘,’ Identifier (‘as’ Identifier)? )* ‘}’ ‘from’ StringLiteral ‘;’
Trait Implementations§
source§impl<'ast> Clone for ImportDirective<'ast>
impl<'ast> Clone for ImportDirective<'ast>
source§fn clone(&self) -> ImportDirective<'ast>
fn clone(&self) -> ImportDirective<'ast>
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<'ast> Debug for ImportDirective<'ast>
impl<'ast> Debug for ImportDirective<'ast>
source§impl<'ast> From<ImportDirective<'ast>> for SourceUnit<'ast>
impl<'ast> From<ImportDirective<'ast>> for SourceUnit<'ast>
source§fn from(val: ImportDirective<'ast>) -> Self
fn from(val: ImportDirective<'ast>) -> Self
Converts to this type from the input type.