pub struct AstWithTypes {
pub ast: Ast,
pub type_declarations: Vec<TypeDeclarationFull>,
}Expand description
A parsed Luau program with type declarations pulled out separately.
You get this from Parser::parse_with_types.
The type Foo = ... and export type Bar = ... declarations live in
type_declarations instead of being mixed into the statement list.
Fields§
§ast: AstThe syntax tree (statements and comments).
type_declarations: Vec<TypeDeclarationFull>All type and export type declarations, with their full type expressions resolved.
Implementations§
Source§impl AstWithTypes
impl AstWithTypes
pub fn new(ast: Ast, type_declarations: Vec<TypeDeclarationFull>) -> Self
Trait Implementations§
Source§impl Clone for AstWithTypes
impl Clone for AstWithTypes
Source§fn clone(&self) -> AstWithTypes
fn clone(&self) -> AstWithTypes
Returns a duplicate 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 AstWithTypes
impl Debug for AstWithTypes
Source§impl PartialEq for AstWithTypes
impl PartialEq for AstWithTypes
impl StructuralPartialEq for AstWithTypes
Auto Trait Implementations§
impl Freeze for AstWithTypes
impl RefUnwindSafe for AstWithTypes
impl Send for AstWithTypes
impl Sync for AstWithTypes
impl Unpin for AstWithTypes
impl UnsafeUnpin for AstWithTypes
impl UnwindSafe for AstWithTypes
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