@@ -3,17 +3,17 @@ use rusty_parser::*;
33
44use super :: post_conversion_linter:: PostConversionLinter ;
55use crate :: built_ins:: { lint_function_call, lint_sub_call} ;
6- use crate :: core:: { LintErrorPos , NameContext } ;
6+ use crate :: core:: { LintErrorPos , NameScope } ;
77
88/// Lints built-in functions and subs.
99pub struct BuiltInLinter {
10- name_context : NameContext ,
10+ name_scope : NameScope ,
1111}
1212
1313impl BuiltInLinter {
1414 pub fn new ( ) -> Self {
1515 Self {
16- name_context : NameContext :: Global ,
16+ name_scope : NameScope :: Global ,
1717 }
1818 }
1919}
@@ -23,16 +23,16 @@ impl PostConversionLinter for BuiltInLinter {
2323 & mut self ,
2424 f : & FunctionImplementation ,
2525 ) -> Result < ( ) , LintErrorPos > {
26- self . name_context = NameContext :: Function ;
26+ self . name_scope = NameScope :: Function ;
2727 let result = self . visit_statements ( & f. body ) ;
28- self . name_context = NameContext :: Global ;
28+ self . name_scope = NameScope :: Global ;
2929 result
3030 }
3131
3232 fn visit_sub_implementation ( & mut self , s : & SubImplementation ) -> Result < ( ) , LintErrorPos > {
33- self . name_context = NameContext :: Sub ;
33+ self . name_scope = NameScope :: Sub ;
3434 let result = self . visit_statements ( & s. body ) ;
35- self . name_context = NameContext :: Global ;
35+ self . name_scope = NameScope :: Global ;
3636 result
3737 }
3838
@@ -43,7 +43,7 @@ impl PostConversionLinter for BuiltInLinter {
4343 ) -> Result < ( ) , LintErrorPos > {
4444 let ( built_in_sub, args) = built_in_sub_call. into ( ) ;
4545 self . visit_expressions ( args) ?;
46- lint_sub_call ( built_in_sub, pos, args, self . name_context )
46+ lint_sub_call ( built_in_sub, pos, args, self . name_scope )
4747 }
4848
4949 fn visit_expression ( & mut self , expr_pos : & ExpressionPos ) -> Result < ( ) , LintErrorPos > {
0 commit comments