[llvm] [Dexter] Add basic structured script parsing (PR #193710)

via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 23 03:20:17 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
darker --check --diff -r origin/main...HEAD cross-project-tests/debuginfo-tests/dexter/dex/test_script/Nodes.py cross-project-tests/debuginfo-tests/dexter/dex/test_script/Script.py cross-project-tests/debuginfo-tests/dexter/dex/test_script/__init__.py cross-project-tests/debuginfo-tests/dexter/dex/dextIR/DextIR.py cross-project-tests/debuginfo-tests/dexter/dex/tools/TestToolBase.py cross-project-tests/debuginfo-tests/dexter/dex/tools/test/Tool.py
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- test_script/Script.py	2026-04-23 09:55:33.000000 +0000
+++ test_script/Script.py	2026-04-23 10:19:42.487825 +0000
@@ -34,11 +34,14 @@
     chain of the current Node. Therefore each Script has a root Scope object, and each Node's context is given by a
     Scope chain built from the root Scope and every Where between the root and the given Node.
     """
 
     def __init__(
-        self, file: str | None = None, where: Where | None = None, parent_scope: "Scope | None" = None
+        self,
+        file: str | None = None,
+        where: Where | None = None,
+        parent_scope: "Scope | None" = None,
     ):
         """Can be initialized with either a file for the default Scope, or with the properties of a Where
         for any script-nested Scope.
         """
         if where is not None:
@@ -60,10 +63,11 @@
             self.parent_scope = None
 
     def add_where(self, where: Where):
         """Adds `where` to this Scope's chain."""
         return Scope(where=where, parent_scope=self)
+
 
 class DexterScript:
     def __init__(
         self,
         context,

``````````

</details>


https://github.com/llvm/llvm-project/pull/193710


More information about the llvm-commits mailing list