From 2ecb58c57b0a02c7a3de2fd3e1edda67c3f4e1a2 Mon Sep 17 00:00:00 2001 From: Joao Duarte Date: Thu, 12 Sep 2024 21:13:02 -0300 Subject: [PATCH] fix: mark modifiers node as having children unordered --- bin/tests/scenarios/abstract/base.java | 3 +++ bin/tests/scenarios/abstract/left.java | 5 +++++ bin/tests/scenarios/abstract/merge.java | 1 + bin/tests/scenarios/abstract/right.java | 3 +++ parsing/src/tree_sitter_parser.rs | 1 + 5 files changed, 13 insertions(+) create mode 100644 bin/tests/scenarios/abstract/base.java create mode 100644 bin/tests/scenarios/abstract/left.java create mode 100644 bin/tests/scenarios/abstract/merge.java create mode 100644 bin/tests/scenarios/abstract/right.java diff --git a/bin/tests/scenarios/abstract/base.java b/bin/tests/scenarios/abstract/base.java new file mode 100644 index 0000000..713f713 --- /dev/null +++ b/bin/tests/scenarios/abstract/base.java @@ -0,0 +1,3 @@ +public abstract class Teste { + public abstract void teste(); +} diff --git a/bin/tests/scenarios/abstract/left.java b/bin/tests/scenarios/abstract/left.java new file mode 100644 index 0000000..3c0778c --- /dev/null +++ b/bin/tests/scenarios/abstract/left.java @@ -0,0 +1,5 @@ +public abstract class Teste { + private String a; + + public abstract void teste(); +} diff --git a/bin/tests/scenarios/abstract/merge.java b/bin/tests/scenarios/abstract/merge.java new file mode 100644 index 0000000..3a7d7f3 --- /dev/null +++ b/bin/tests/scenarios/abstract/merge.java @@ -0,0 +1 @@ +public class Teste { private String a ; public void teste ( ) ; } diff --git a/bin/tests/scenarios/abstract/right.java b/bin/tests/scenarios/abstract/right.java new file mode 100644 index 0000000..41a31ee --- /dev/null +++ b/bin/tests/scenarios/abstract/right.java @@ -0,0 +1,3 @@ +public class Teste { + public void teste(); +} diff --git a/parsing/src/tree_sitter_parser.rs b/parsing/src/tree_sitter_parser.rs index d16ee3a..124b516 100644 --- a/parsing/src/tree_sitter_parser.rs +++ b/parsing/src/tree_sitter_parser.rs @@ -22,6 +22,7 @@ impl From for ParserConfiguration { kinds_with_unordered_children: [ "interface_body", "class_body", + "modifiers", "enum_body_declarations", ] .into(),