-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
181 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
mod ast_visitor; | ||
mod nodes; | ||
mod pre_analysis; | ||
mod semanal_utils; | ||
mod state; | ||
mod symbol_table; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1 @@ | ||
use parser::ast::{ConstantValue, Expression}; | ||
|
||
use crate::symbol_table::NodeType; | ||
|
||
pub fn get_target_name(assignment_target: &Expression) -> String { | ||
match assignment_target { | ||
Expression::Name(n) => n.id.clone(), | ||
_ => panic!("cannot defer name of the assignment target"), | ||
} | ||
} | ||
|
||
|
||
pub fn get_constant_value_type(constant: &ConstantValue) -> NodeType { | ||
match constant { | ||
ConstantValue::Str(_) => NodeType::String, | ||
_ => panic!("not impl"), | ||
} | ||
} | ||
use parser::ast::Expression; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.