-
-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add dart class support #2677
add dart class support #2677
Changes from 1 commit
48c4fdb
8a965ff
591fb87
7e25ceb
11b8466
7fe3a1e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
class MyClass { | ||
|
||
} | ||
--- | ||
|
||
[Content] = | ||
[Removal] = | ||
[Domain] = 0:0-2:1 | ||
>--------------- | ||
0| class MyClass { | ||
1| | ||
2| } | ||
-< | ||
|
||
[Insertion delimiter] = "\n\n" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
class MyClass { | ||
|
||
} | ||
--- | ||
|
||
[Content] = | ||
[Domain] = 0:6-0:13 | ||
>-------< | ||
0| class MyClass { | ||
|
||
[Removal] = 0:6-0:14 | ||
>--------< | ||
0| class MyClass { | ||
|
||
[Leading delimiter] = 0:5-0:6 | ||
>-< | ||
0| class MyClass { | ||
|
||
[Trailing delimiter] = 0:13-0:14 | ||
>-< | ||
0| class MyClass { | ||
|
||
[Insertion delimiter] = " " |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,22 @@ | ||
foo() { | ||
if (true) {} | ||
final hi = ''; | ||
if (hi.isNotEmpty) { | ||
|
||
// | ||
} | ||
|
||
|
||
else if (true) { | ||
// | ||
} | ||
|
||
final list = [1, 2, 3]; | ||
|
||
final map = { | ||
'hi': 1, | ||
}; | ||
} | ||
|
||
class Something{ | ||
|
||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -16,3 +16,17 @@ | |||||
(set_or_map_literal) | ||||||
(map_pattern) | ||||||
] @map | ||||||
|
||||||
;;!! class Foo {} | ||||||
;;! ^^^^^^^^^^^^ | ||||||
( | ||||||
[ | ||||||
(class_definition | ||||||
name: (_) @className | ||||||
) | ||||||
(class_definition | ||||||
|
||||||
pokey marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
name: (_) @className | ||||||
) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do you have two of these? |
||||||
] @class | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The domain of class name should be the whole class, so that you can say "class name" from anywhere in the class Note you'll need to rerun update fixtures after this change
Suggested change
|
||||||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this empty line shouldn't appear. Have you installed all the recommended extensions? In particular, Andreas's vscode extension should autoformat
.scm
files. Though maybe you need to configure it to be the formatter for.scm
files?