Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Example of `.scope` file for the javascript statement scope.
```
const value = 0;
---

[Content] =
[Removal] =
[Domain] = 0:0-0:16
Expand All @@ -25,6 +26,7 @@ General layout of a `.scope` file is:
```
Source code
---

Scopes
```

Expand Down
4 changes: 2 additions & 2 deletions packages/lib-engine/src/testUtil/serializeScopeFixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ function serializeScopeFixtureHelper(
codeLines: string[],
scopes: string[],
): string {
const serializedScopes = scopes.join("\n\n");
const serializedScopes = scopes.join("\n\n").trimStart();

return [...codeLines, "---", serializedScopes, ""].join("\n");
return [...codeLines, "---", "", serializedScopes, ""].join("\n");
}

function serializeScope(
Expand Down
1 change: 1 addition & 0 deletions resources/fixtures/scopes/c/disqualifyDelimiter.scope
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ a <<= 2;
a >>= 2;
foo->bar;
---

[#1 Content] = 0:2-0:3
>-<
0| 1 < 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
(<= 1 2)
(>= 1 2)
---

[#1 Content] = 0:1-0:2
>-<
0| (< 1 2)
Expand Down
1 change: 1 addition & 0 deletions resources/fixtures/scopes/cpp/disqualifyDelimiter.scope
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
auto max() -> int;
---

[Content] = 0:11-0:13
>--<
0| auto max() -> int;
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ a >>= 2;
() => 2;
foo->bar;
---

[#1 Content] = 0:2-0:3
>-<
0| 1 < 2;
Expand Down
1 change: 1 addition & 0 deletions resources/fixtures/scopes/css/disqualifyDelimiter.scope
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
div > div {}
---

[Content] = 0:4-0:5
>-<
0| div > div {}
1 change: 1 addition & 0 deletions resources/fixtures/scopes/dart/disqualifyDelimiter.scope
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class Foo {
int get bar => 0;
}
---

[#1 Content] = 1:6-1:7
>-<
1| 1 < 2;
Expand Down
1 change: 1 addition & 0 deletions resources/fixtures/scopes/go/disqualifyDelimiter.scope
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ a >>= 2
ch <- 2
msg := <- ch
---

[#1 Content] = 0:2-0:3
>-<
0| 1 < 2
Expand Down
1 change: 1 addition & 0 deletions resources/fixtures/scopes/java/disqualifyDelimiter.scope
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ switch (value) {
case a -> 2
}
---

[#1 Content] = 0:2-0:3
>-<
0| 1 < 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ a >>> 2;
a >>>= 2;
() => 2;
---

[#1 Content] = 0:2-0:3
>-<
0| 1 < 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ when (foo) {
a -> 2
}
---

[#1 Content] = 0:2-0:3
>-<
0| 1 < 2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
1 < 2
1 > 2
---

[#1 Content] = 0:2-0:3
>-<
0| 1 < 2
Expand Down
1 change: 1 addition & 0 deletions resources/fixtures/scopes/lua/disqualifyDelimiter.scope
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ a = 1 >= 2
a = 1 << 2
a = 1 >> 2
---

[#1 Content] = 0:6-0:7
>-<
0| a = 1 < 2
Expand Down
1 change: 1 addition & 0 deletions resources/fixtures/scopes/php/disqualifyDelimiter.scope
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ foo->bar();
foo?->bar;
foo?->bar();
---

[#1 Content] = 1:2-1:3
>-<
1| 1 < 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ a <<= 2
a >>= 2
def foo() -> int: pass
---

[#1 Content] = 0:2-0:3
>-<
0| 1 < 2
Expand Down
1 change: 1 addition & 0 deletions resources/fixtures/scopes/r/disqualifyDelimiter.scope
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ a <<- 2
a ->> 2
a |> 2
---

[#1 Content] = 0:2-0:3
>-<
0| 1 < 2
Expand Down
1 change: 1 addition & 0 deletions resources/fixtures/scopes/ruby/disqualifyDelimiter.scope
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ case foo
when a then => 2
end
---

[#1 Content] = 0:2-0:3
>-<
0| 1 < 2
Expand Down
1 change: 1 addition & 0 deletions resources/fixtures/scopes/rust/disqualifyDelimiter.scope
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ macro_rules! my_expr {
($x:expr) => {};
}
---

[#1 Content] = 0:2-0:3
>-<
0| 1 < 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ foo match {
case a => 2
}
---

[#1 Content] = 0:2-0:3
>-<
0| 1 < 2
Expand Down
1 change: 1 addition & 0 deletions resources/fixtures/scopes/scss/disqualifyDelimiter.scope
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
@if 1 >= 2 {}
}
---

[#1 Content] = 1:10-1:11
>-<
1| @if 1 < 2 {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ a >~ 2
..<2
let foo: () -> Int
---

[#1 Content] = 0:2-0:3
>-<
0| 1 < 2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Promise<() => number>
---

[Content] = 0:11-0:13
>--<
0| Promise<() => number>
1 change: 1 addition & 0 deletions resources/fixtures/scopes/yaml/disqualifyDelimiter.scope
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ a: >
a: >-
a: >+
---

[#1 Content] = 0:3-0:4
>-<
0| a: >
Expand Down
Loading