pub enum Node {
Module(Module),
Divider(Divider),
Brief(Brief),
Tag(Tag),
Func(Func),
Class(Class),
Alias(Alias),
Type(Type),
Export(String),
Toc(String),
}
Variants§
Module(Module)
Divider(Divider)
Brief(Brief)
Tag(Tag)
Func(Func)
Class(Class)
Alias(Alias)
Type(Type)
Export(String)
Toc(String)
Implementations§
Source§impl Node
impl Node
Sourcepub fn new(src: &str) -> Result<Vec<Node>, Vec<Simple<TagType>>>
pub fn new(src: &str) -> Result<Vec<Node>, Vec<Simple<TagType>>>
Creates stream of AST nodes from emmylua
let src = r#"
local U = {}
---Add two integar and print it
---@param this number First number
---@param that number Second number
function U.sum(this, that)
print(this + that)
end
return U
"#;
let nodes = lemmy_help::parser::Node::new(src).unwrap();
assert!(!nodes.is_empty());
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
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