Skip to content

Commit

Permalink
chore: remove unused AST module name
Browse files Browse the repository at this point in the history
Signed-off-by: peefy <xpf6677@163.com>
  • Loading branch information
Peefy committed Oct 24, 2024
1 parent 3cbb37d commit 2ae0b0c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 6 deletions.
1 change: 0 additions & 1 deletion kclvm/ast/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,6 @@ impl Program {
pub struct Module {
pub filename: String,
pub doc: Option<NodeRef<String>>,
pub name: String,
pub body: Vec<NodeRef<Stmt>>,
pub comments: Vec<NodeRef<Comment>>,
}
Expand Down
3 changes: 0 additions & 3 deletions kclvm/ast/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ fn test_filter_schema_with_no_schema() {
let ast_mod = Module {
filename: "".to_string(),
doc: Some(node_ref!("".to_string())),
name: "".to_string(),
body: vec![],
comments: vec![],
};
Expand All @@ -193,7 +192,6 @@ fn test_filter_schema_with_one_schema() {
let mut ast_mod = Module {
filename: "".to_string(),
doc: Some(node_ref!("".to_string())),
name: "".to_string(),
body: vec![],
comments: vec![],
};
Expand All @@ -209,7 +207,6 @@ fn test_filter_schema_with_mult_schema() {
let mut ast_mod = Module {
filename: "".to_string(),
doc: Some(node_ref!("".to_string())),
name: "".to_string(),
body: vec![],
comments: vec![],
};
Expand Down
1 change: 0 additions & 1 deletion kclvm/parser/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ pub fn parse_file_with_session(
let mut p = parser::Parser::new(&sess, stream);
let mut m = p.parse_module();
m.filename = filename.to_string().adjust_canonicalization();
m.name = kclvm_ast::MAIN_PKG.to_string();

Ok(m)
}
Expand Down
1 change: 0 additions & 1 deletion kclvm/parser/src/parser/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ impl<'a> Parser<'a> {
let body = self.parse_body();
Module {
filename: "".to_string(),
name: "".to_string(),
doc,
comments: self.comments.clone(),
body,
Expand Down

0 comments on commit 2ae0b0c

Please sign in to comment.