Make methods on Visitor public
And remove comment
This commit is contained in:
parent
e947569100
commit
e68331fe0a
@ -5,7 +5,7 @@ mod visitor;
|
|||||||
mod operators;
|
mod operators;
|
||||||
|
|
||||||
pub use operators::{PrefixOp, BinOp};
|
pub use operators::{PrefixOp, BinOp};
|
||||||
pub use visitor::{walk_ast, ASTVisitor};
|
pub use visitor::{walk_ast, walk_block, ASTVisitor};
|
||||||
|
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use crate::derivative::Derivative;
|
use crate::derivative::Derivative;
|
||||||
@ -119,21 +119,6 @@ pub enum Declaration {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @foo(arg1, arg2)
|
|
||||||
* fn hello() {
|
|
||||||
*
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* Declaration::Annotation {
|
|
||||||
* name: "foo",
|
|
||||||
* arguments: vec!["arg1", "arg2"]
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Clone)]
|
#[derive(Debug, PartialEq, Clone)]
|
||||||
pub struct Signature {
|
pub struct Signature {
|
||||||
pub name: Rc<String>,
|
pub name: Rc<String>,
|
||||||
|
@ -19,7 +19,7 @@ pub fn walk_ast<V: ASTVisitor>(v: &mut V, ast: &AST) {
|
|||||||
walk_block(v, &ast.statements);
|
walk_block(v, &ast.statements);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn walk_block<V: ASTVisitor>(v: &mut V, block: &Block) {
|
pub fn walk_block<V: ASTVisitor>(v: &mut V, block: &Block) {
|
||||||
use StatementKind::*;
|
use StatementKind::*;
|
||||||
for statement in block.iter() {
|
for statement in block.iter() {
|
||||||
match statement.kind {
|
match statement.kind {
|
||||||
|
Loading…
Reference in New Issue
Block a user