-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from dkearns/highlight-record-keyword
Highlight record as a keyword
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
Given cs (record matching via body): | ||
record Foo {} | ||
record struct Foo {} | ||
record class Foo {} | ||
|
||
Execute: | ||
AssertEqual 'csStorage', SyntaxOf('record', 1) | ||
AssertEqual 'csStorage', SyntaxOf('record', 2) | ||
AssertEqual 'csStorage', SyntaxOf('record', 3) | ||
|
||
Given cs (record matching via body): | ||
record Foo; | ||
record struct Foo; | ||
record class Foo; | ||
|
||
Execute: | ||
AssertEqual 'csStorage', SyntaxOf('record', 1) | ||
AssertEqual 'csStorage', SyntaxOf('record', 2) | ||
AssertEqual 'csStorage', SyntaxOf('record', 3) | ||
|
||
Given cs (record matching via type parameter list): | ||
record Foo<T>; | ||
record struct Foo<T>; | ||
record class Foo<T>; | ||
|
||
Execute: | ||
AssertEqual 'csStorage', SyntaxOf('record', 1) | ||
AssertEqual 'csStorage', SyntaxOf('record', 2) | ||
AssertEqual 'csStorage', SyntaxOf('record', 3) | ||
|
||
Given cs (record matching via parameter list): | ||
record Foo(int X, int Y); | ||
record struct Foo(int X, int Y); | ||
record class Foo(int X, int Y); | ||
|
||
Execute: | ||
AssertEqual 'csStorage', SyntaxOf('record', 1) | ||
AssertEqual 'csStorage', SyntaxOf('record', 2) | ||
AssertEqual 'csStorage', SyntaxOf('record', 3) | ||
|
||
Given cs (record matching via base type): | ||
record Foo : Bar; | ||
record struct Foo : Bar; | ||
record class Foo : Bar; | ||
|
||
Execute: | ||
AssertEqual 'csStorage', SyntaxOf('record', 1) | ||
AssertEqual 'csStorage', SyntaxOf('record', 2) | ||
AssertEqual 'csStorage', SyntaxOf('record', 3) | ||
|
||
Given cs (record matching via modifier): | ||
partial record Foo ... | ||
partial record struct ... | ||
partial record class ... | ||
|
||
Execute: | ||
AssertEqual 'csStorage', SyntaxOf('record', 1) | ||
AssertEqual 'csStorage', SyntaxOf('record', 2) | ||
AssertEqual 'csStorage', SyntaxOf('record', 3) | ||
|
||
Given cs (record matching via class or struct): | ||
record struct ... | ||
record class ... | ||
|
||
Execute: | ||
AssertEqual 'csStorage', SyntaxOf('record', 1) | ||
AssertEqual 'csStorage', SyntaxOf('record', 2) |