feat: multiline support

This commit is contained in:
Tomas Nemec 2023-12-15 22:11:22 +01:00 committed by Lewis Russell
parent cfa8ee19ac
commit c8e81cbceb
2 changed files with 164 additions and 12 deletions

View file

@ -1,7 +1,29 @@
([
(class_definition)
(try_statement)
(if_statement)
(function_body)
(for_statement)
] @context)
(function_body) @context
(for_statement
body: (_) @context.end
) @context
(while_statement
body: (_) @context.end
) @context
(do_statement
body: (_) @context.end
) @context
(try_statement
body: (_) @context.end
) @context
(if_statement
consequence: (_) @context.end
) @context
(class_definition
body: (_) @context.end
) @context
(extension_declaration
body: (_) @context.end
) @context

View file

@ -1,5 +1,8 @@
class User {
@Deprecated('')
abstract
class User
extends
Object {
User(this.age);
int age;
@ -34,14 +37,22 @@ class User {
}
String (int magicalNumber) {
if (magicalNumber == "69") {
String(
int magicalNumber,
) {
if (magicalNumber == "69"
// --
||
magicalNumber == "420") {
return 'pretty nice';
} else if (magicalNumber == "420"){
} else if (magicalNumber == "420" // -
&&
magicalNumber == "69") {
@ -66,4 +77,123 @@ String (int magicalNumber) {
return 'pretty high';
}
return 'just decent';
}
void catching() {
try
// --
{
} catch (e) {
} finally {
}
}
void foring() {
for (int i = 0; // -
i < 10;
i++) {
}
while (true // --
== false) {
}
do {
} while (true);
}
extension ext
on int {
}