mirror of
https://github.com/RustPython/Parser.git
synced 2025-09-04 17:41:34 +00:00
Optimize code
This commit is contained in:
parent
70eeb28748
commit
dcca662432
1 changed files with 3 additions and 3 deletions
|
@ -97,7 +97,7 @@ pub struct Symbol {
|
|||
pub name: String,
|
||||
// pub table: SymbolTableRef,
|
||||
pub scope: SymbolScope,
|
||||
// TODO(lynskylate@gmail.com): Use bitflags replace
|
||||
// TODO: Use bitflags replace
|
||||
pub is_referenced: bool,
|
||||
pub is_assigned: bool,
|
||||
pub is_parameter: bool,
|
||||
|
@ -474,11 +474,11 @@ impl SymbolTableBuilder {
|
|||
|
||||
fn scan_parameter(&mut self, parameter: &ast::Parameter) -> SymbolTableResult {
|
||||
let usage = if parameter.annotation.is_some() {
|
||||
SymbolUsage::AnnotationParamater
|
||||
SymbolUsage::AnnotationParameter
|
||||
} else {
|
||||
SymbolUsage::Parameter
|
||||
};
|
||||
self.regsiter_name(¶meter.arg, usage)
|
||||
self.register_name(¶meter.arg, usage)
|
||||
}
|
||||
|
||||
fn scan_parameters_annotations(&mut self, parameters: &[ast::Parameter]) -> SymbolTableResult {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue