Make methods on Visitor public

And remove comment
This commit is contained in:
Greg Shuflin 2021-10-23 21:14:13 -07:00
parent e947569100
commit e68331fe0a
2 changed files with 2 additions and 17 deletions

View File

@ -5,7 +5,7 @@ mod visitor;
mod operators;
pub use operators::{PrefixOp, BinOp};
pub use visitor::{walk_ast, ASTVisitor};
pub use visitor::{walk_ast, walk_block, ASTVisitor};
use std::rc::Rc;
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)]
pub struct Signature {
pub name: Rc<String>,

View File

@ -19,7 +19,7 @@ pub fn walk_ast<V: ASTVisitor>(v: &mut V, ast: &AST) {
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::*;
for statement in block.iter() {
match statement.kind {