Skip to content

Commit

Permalink
Added fallback for preferred scope (#2648)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasArvidsson authored Aug 8, 2024
1 parent ccf5f08 commit c993474
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/fallback.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ def get_modifier_callback(modifier: dict) -> Callable:
case "containingScope":
scope_type_type = modifier["scopeType"]["type"]
return get_simple_modifier_callback(f"{modifier_type}.{scope_type_type}")
case "preferredScope":
scope_type_type = modifier["scopeType"]["type"]
return get_simple_modifier_callback(f"containingScope.{scope_type_type}")
case "extendThroughStartOf":
if "modifiers" not in modifier:
return get_simple_modifier_callback(f"{modifier_type}.line")
Expand Down

0 comments on commit c993474

Please sign in to comment.