Skip to content

Commit

Permalink
chore: s/in_schema_config_r_value/in_config_r_value
Browse files Browse the repository at this point in the history
Signed-off-by: he1pa <18012015693@163.com>
  • Loading branch information
He1pa committed Aug 8, 2024
1 parent b72f31e commit f5fef85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions kclvm/sema/src/advanced_resolver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ pub struct Context<'ctx> {
// ValueSymbol instead of an UnresolvedSymbol
maybe_def: bool,
// whether in schema config right value, affect lookup def
in_schema_config_r_value: bool,
in_config_r_value: bool,
}

impl<'ctx> Context<'ctx> {
Expand Down Expand Up @@ -113,7 +113,7 @@ impl<'ctx> AdvancedResolver<'ctx> {
end_pos: Position::dummy_pos(),
cur_node: AstIndex::default(),
maybe_def: false,
in_schema_config_r_value: false,
in_config_r_value: false,
},
};
// Scan all scehma symbol
Expand Down
8 changes: 4 additions & 4 deletions kclvm/sema/src/advanced_resolver/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,7 @@ impl<'ctx> AdvancedResolver<'ctx> {
cur_scope,
self.get_current_module_info(),
maybe_def,
!self.ctx.in_schema_config_r_value,
!self.ctx.in_config_r_value,
);
if first_symbol.is_none() {
// Maybe import package symbol
Expand Down Expand Up @@ -1281,7 +1281,7 @@ impl<'ctx> AdvancedResolver<'ctx> {
cur_scope,
self.get_current_module_info(),
true,
!self.ctx.in_schema_config_r_value,
!self.ctx.in_config_r_value,
);
match first_symbol {
Some(symbol_ref) => {
Expand Down Expand Up @@ -1822,9 +1822,9 @@ impl<'ctx> AdvancedResolver<'ctx> {
end,
LocalSymbolScopeKind::ConfigRightValue,
);
self.ctx.in_schema_config_r_value = true;
self.ctx.in_config_r_value = true;
self.expr(&entry.node.value)?;
self.ctx.in_schema_config_r_value = false;
self.ctx.in_config_r_value = false;
self.leave_scope();

if let Some(key) = &entry.node.key {
Expand Down

0 comments on commit f5fef85

Please sign in to comment.