Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
atacan committed Jan 18, 2025
1 parent 1110787 commit 3a54328
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
3 changes: 3 additions & 0 deletions data/fixtures/scopes/swift/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"imports": ["swift"]
}
26 changes: 17 additions & 9 deletions packages/common/src/scopeSupportFacets/swift.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,29 @@ export const swiftScopeSupport: LanguageScopeSupportFacetMap = {
// Collections
list: supported,
map: supported,
key: supported,

// Control flow
ifStatement: supported,
branch: supported,
condition: supported,
"condition.if": supported,
"condition.switchCase": supported,
"condition.switchCase.iteration": supported,

// Text fragments
string: supported,
comment: supported,
"string.singleLine": supported,
"string.multiLine": supported,
"comment.line": supported,
"comment.block": supported,

// Statements and blocks
statement: supported,

// Classes and types
class: supported,
className: supported,
type: supported,
"type.class": supported,
"type.variable": supported,
"type.return": supported,
"type.field": supported,

// Functions
anonymousFunction: supported,
Expand All @@ -37,9 +42,12 @@ export const swiftScopeSupport: LanguageScopeSupportFacetMap = {
"argument.actual": supported,

// Names and values
name: supported,
value: supported,
"name.function": supported,
"name.variable": supported,
"name.field": supported,
"value.variable": supported,
"value.field": supported,

// Swift-specific features
regularExpression: notApplicable, // Swift doesn't have regex literals
};
};

0 comments on commit 3a54328

Please sign in to comment.