Repository: crytic/slither

Issue:
Yul calldata offset and length support
### Describe the desired feature

In solidity 0.7.5, `.offset` and `.length` were added to calldata variables of dynamic arrays in yul as described in https://blog.soliditylang.org/2020/11/18/solidity-0.7.5-release-announcement/.

It appears that currently slither is missing support for those cause code that makes use of that to fail inside the Yul parser. Support should be similar to the existing support of `.slot` and `.offset` for storage variables.

I'm planning on submitting a PR with a proposed fix, but I wanted to open an issue as well in case their are issues with the PR


Discussion:

Resolving patch:
diff --git a/slither/solc_parsing/yul/parse_yul.py b/slither/solc_parsing/yul/parse_yul.py
--- a/slither/solc_parsing/yul/parse_yul.py
+++ b/slither/solc_parsing/yul/parse_yul.py
@@ -773,6 +773,14 @@ def parse_yul_identifier(root: YulScope, _node: YulNode, ast: Dict) -> Optional[
         variable_found = _check_for_state_variable_name(root, potential_name)
         if variable_found:
             return variable_found
+        var = root.function.get_local_variable_from_name(potential_name)
+        if var and var.location == "calldata":
+            return Identifier(var)
+    if name.endswith(".length"):
+        potential_name = name[:-7]
+        var = root.function.get_local_variable_from_name(potential_name)
+        if var and var.location == "calldata":
+            return Identifier(var)
 
     raise SlitherException(f"unresolved reference to identifier {name}")
 


Test patch:
diff --git a/tests/ast-parsing/compile/import-0.4.0-legacy.zip b/tests/ast-parsing/compile/import-0.4.0-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.0-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.4.1-legacy.zip b/tests/ast-parsing/compile/import-0.4.1-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.1-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.4.10-legacy.zip b/tests/ast-parsing/compile/import-0.4.10-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.10-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.4.11-legacy.zip b/tests/ast-parsing/compile/import-0.4.11-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.11-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.4.14-compact.zip b/tests/ast-parsing/compile/import-0.4.14-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.14-compact.zip differ
diff --git a/tests/ast-parsing/compile/import-0.4.14-legacy.zip b/tests/ast-parsing/compile/import-0.4.14-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.14-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.4.16-compact.zip b/tests/ast-parsing/compile/import-0.4.16-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.16-compact.zip differ
diff --git a/tests/ast-parsing/compile/import-0.4.16-legacy.zip b/tests/ast-parsing/compile/import-0.4.16-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.16-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.4.21-compact.zip b/tests/ast-parsing/compile/import-0.4.21-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.21-compact.zip differ
diff --git a/tests/ast-parsing/compile/import-0.4.21-legacy.zip b/tests/ast-parsing/compile/import-0.4.21-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.21-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.4.22-compact.zip b/tests/ast-parsing/compile/import-0.4.22-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.22-compact.zip differ
diff --git a/tests/ast-parsing/compile/import-0.4.22-legacy.zip b/tests/ast-parsing/compile/import-0.4.22-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.22-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.4.23-compact.zip b/tests/ast-parsing/compile/import-0.4.23-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.23-compact.zip differ
diff --git a/tests/ast-parsing/compile/import-0.4.23-legacy.zip b/tests/ast-parsing/compile/import-0.4.23-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.23-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.4.24-compact.zip b/tests/ast-parsing/compile/import-0.4.24-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.24-compact.zip differ
diff --git a/tests/ast-parsing/compile/import-0.4.24-legacy.zip b/tests/ast-parsing/compile/import-0.4.24-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.24-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.4.3-legacy.zip b/tests/ast-parsing/compile/import-0.4.3-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.3-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.4.5-legacy.zip b/tests/ast-parsing/compile/import-0.4.5-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.5-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.4.7-legacy.zip b/tests/ast-parsing/compile/import-0.4.7-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.7-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.4.8-legacy.zip b/tests/ast-parsing/compile/import-0.4.8-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.8-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.5.0-compact.zip b/tests/ast-parsing/compile/import-0.5.0-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.5.0-compact.zip differ
diff --git a/tests/ast-parsing/compile/import-0.5.0-legacy.zip b/tests/ast-parsing/compile/import-0.5.0-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.5.0-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.5.14-compact.zip b/tests/ast-parsing/compile/import-0.5.14-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.5.14-compact.zip differ
diff --git a/tests/ast-parsing/compile/import-0.5.14-legacy.zip b/tests/ast-parsing/compile/import-0.5.14-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.5.14-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.5.3-compact.zip b/tests/ast-parsing/compile/import-0.5.3-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.5.3-compact.zip differ
diff --git a/tests/ast-parsing/compile/import-0.5.3-legacy.zip b/tests/ast-parsing/compile/import-0.5.3-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.5.3-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.5.4-compact.zip b/tests/ast-parsing/compile/import-0.5.4-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.5.4-compact.zip differ
diff --git a/tests/ast-parsing/compile/import-0.5.4-legacy.zip b/tests/ast-parsing/compile/import-0.5.4-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.5.4-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.6.0-compact.zip b/tests/ast-parsing/compile/import-0.6.0-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.0-compact.zip differ
diff --git a/tests/ast-parsing/compile/import-0.6.0-legacy.zip b/tests/ast-parsing/compile/import-0.6.0-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.0-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.6.1-compact.zip b/tests/ast-parsing/compile/import-0.6.1-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.1-compact.zip differ
diff --git a/tests/ast-parsing/compile/import-0.6.1-legacy.zip b/tests/ast-parsing/compile/import-0.6.1-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.1-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.6.2-compact.zip b/tests/ast-parsing/compile/import-0.6.2-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.2-compact.zip differ
diff --git a/tests/ast-parsing/compile/import-0.6.2-legacy.zip b/tests/ast-parsing/compile/import-0.6.2-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.2-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.6.5-compact.zip b/tests/ast-parsing/compile/import-0.6.5-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.5-compact.zip differ
diff --git a/tests/ast-parsing/compile/import-0.6.5-legacy.zip b/tests/ast-parsing/compile/import-0.6.5-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.5-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.6.7-compact.zip b/tests/ast-parsing/compile/import-0.6.7-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.7-compact.zip differ
diff --git a/tests/ast-parsing/compile/import-0.6.7-legacy.zip b/tests/ast-parsing/compile/import-0.6.7-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.7-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.6.8-compact.zip b/tests/ast-parsing/compile/import-0.6.8-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.8-compact.zip differ
diff --git a/tests/ast-parsing/compile/import-0.6.8-legacy.zip b/tests/ast-parsing/compile/import-0.6.8-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.8-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.6.9-compact.zip b/tests/ast-parsing/compile/import-0.6.9-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.9-compact.zip differ
diff --git a/tests/ast-parsing/compile/import-0.6.9-legacy.zip b/tests/ast-parsing/compile/import-0.6.9-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.9-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.7.0-compact.zip b/tests/ast-parsing/compile/import-0.7.0-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.7.0-compact.zip differ
diff --git a/tests/ast-parsing/compile/import-0.7.0-legacy.zip b/tests/ast-parsing/compile/import-0.7.0-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.7.0-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.7.1-compact.zip b/tests/ast-parsing/compile/import-0.7.1-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.7.1-compact.zip differ
diff --git a/tests/ast-parsing/compile/import-0.7.1-legacy.zip b/tests/ast-parsing/compile/import-0.7.1-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.7.1-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.7.4-compact.zip b/tests/ast-parsing/compile/import-0.7.4-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.7.4-compact.zip differ
diff --git a/tests/ast-parsing/compile/import-0.7.4-legacy.zip b/tests/ast-parsing/compile/import-0.7.4-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.7.4-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.7.5-compact.zip b/tests/ast-parsing/compile/import-0.7.5-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.7.5-compact.zip differ
diff --git a/tests/ast-parsing/compile/import-0.7.5-legacy.zip b/tests/ast-parsing/compile/import-0.7.5-legacy.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.7.5-legacy.zip differ
diff --git a/tests/ast-parsing/compile/import-0.8.0-compact.zip b/tests/ast-parsing/compile/import-0.8.0-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.8.0-compact.zip differ
diff --git a/tests/ast-parsing/compile/import-0.8.4-compact.zip b/tests/ast-parsing/compile/import-0.8.4-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.8.4-compact.zip differ
diff --git a/tests/ast-parsing/compile/import-0.8.6-compact.zip b/tests/ast-parsing/compile/import-0.8.6-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.8.6-compact.zip differ
diff --git a/tests/ast-parsing/compile/import-0.8.7-compact.zip b/tests/ast-parsing/compile/import-0.8.7-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/import-0.8.7-compact.zip differ
diff --git a/tests/ast-parsing/expected/custom_error-0.4.0-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.0-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.4.0-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.4.1-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.1-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.4.1-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.4.10-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.10-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.4.10-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.4.11-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.11-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.4.11-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.4.14-compact.json b/tests/ast-parsing/expected/custom_error-0.4.14-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.4.14-compact.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.4.14-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.14-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.4.14-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.4.16-compact.json b/tests/ast-parsing/expected/custom_error-0.4.16-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.4.16-compact.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.4.16-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.16-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.4.16-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.4.21-compact.json b/tests/ast-parsing/expected/custom_error-0.4.21-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.4.21-compact.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.4.21-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.21-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.4.21-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.4.22-compact.json b/tests/ast-parsing/expected/custom_error-0.4.22-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.4.22-compact.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.4.22-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.22-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.4.22-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.4.23-compact.json b/tests/ast-parsing/expected/custom_error-0.4.23-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.4.23-compact.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.4.23-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.23-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.4.23-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.4.24-compact.json b/tests/ast-parsing/expected/custom_error-0.4.24-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.4.24-compact.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.4.24-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.24-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.4.24-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.4.3-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.3-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.4.3-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.4.5-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.5-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.4.5-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.4.7-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.7-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.4.7-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.4.8-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.8-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.4.8-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.5.0-compact.json b/tests/ast-parsing/expected/custom_error-0.5.0-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.5.0-compact.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.5.0-legacy.json b/tests/ast-parsing/expected/custom_error-0.5.0-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.5.0-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.5.14-compact.json b/tests/ast-parsing/expected/custom_error-0.5.14-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.5.14-compact.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.5.14-legacy.json b/tests/ast-parsing/expected/custom_error-0.5.14-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.5.14-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.5.3-compact.json b/tests/ast-parsing/expected/custom_error-0.5.3-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.5.3-compact.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.5.3-legacy.json b/tests/ast-parsing/expected/custom_error-0.5.3-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.5.3-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.5.4-compact.json b/tests/ast-parsing/expected/custom_error-0.5.4-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.5.4-compact.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.5.4-legacy.json b/tests/ast-parsing/expected/custom_error-0.5.4-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.5.4-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.6.0-compact.json b/tests/ast-parsing/expected/custom_error-0.6.0-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.6.0-compact.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.6.0-legacy.json b/tests/ast-parsing/expected/custom_error-0.6.0-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.6.0-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.6.1-compact.json b/tests/ast-parsing/expected/custom_error-0.6.1-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.6.1-compact.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.6.1-legacy.json b/tests/ast-parsing/expected/custom_error-0.6.1-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.6.1-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.6.2-compact.json b/tests/ast-parsing/expected/custom_error-0.6.2-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.6.2-compact.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.6.2-legacy.json b/tests/ast-parsing/expected/custom_error-0.6.2-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.6.2-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.6.5-compact.json b/tests/ast-parsing/expected/custom_error-0.6.5-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.6.5-compact.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.6.5-legacy.json b/tests/ast-parsing/expected/custom_error-0.6.5-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.6.5-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.6.7-compact.json b/tests/ast-parsing/expected/custom_error-0.6.7-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.6.7-compact.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.6.7-legacy.json b/tests/ast-parsing/expected/custom_error-0.6.7-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.6.7-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.6.8-compact.json b/tests/ast-parsing/expected/custom_error-0.6.8-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.6.8-compact.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.6.8-legacy.json b/tests/ast-parsing/expected/custom_error-0.6.8-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.6.8-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.6.9-compact.json b/tests/ast-parsing/expected/custom_error-0.6.9-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.6.9-compact.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.6.9-legacy.json b/tests/ast-parsing/expected/custom_error-0.6.9-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.6.9-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.7.0-compact.json b/tests/ast-parsing/expected/custom_error-0.7.0-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.7.0-compact.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.7.0-legacy.json b/tests/ast-parsing/expected/custom_error-0.7.0-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.7.0-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.7.1-compact.json b/tests/ast-parsing/expected/custom_error-0.7.1-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.7.1-compact.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.7.1-legacy.json b/tests/ast-parsing/expected/custom_error-0.7.1-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.7.1-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.7.4-compact.json b/tests/ast-parsing/expected/custom_error-0.7.4-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.7.4-compact.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.7.4-legacy.json b/tests/ast-parsing/expected/custom_error-0.7.4-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.7.4-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.7.5-compact.json b/tests/ast-parsing/expected/custom_error-0.7.5-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.7.5-compact.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.7.5-legacy.json b/tests/ast-parsing/expected/custom_error-0.7.5-legacy.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.7.5-legacy.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.8.0-compact.json b/tests/ast-parsing/expected/custom_error-0.8.0-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.8.0-compact.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.8.4-compact.json b/tests/ast-parsing/expected/custom_error-0.8.4-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.8.4-compact.json
@@ -0,0 +1,16 @@
+{
+  "VendingMachine": {
+    "err0()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n",
+    "err1()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n",
+    "err2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n",
+    "err3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n"
+  },
+  "A": {
+    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n"
+  },
+  "B": {
+    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n",
+    "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n",
+    "h()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n"
+  }
+}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.8.6-compact.json b/tests/ast-parsing/expected/custom_error-0.8.6-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.8.6-compact.json
@@ -0,0 +1,16 @@
+{
+  "VendingMachine": {
+    "err0()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n",
+    "err1()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n",
+    "err2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n",
+    "err3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n"
+  },
+  "A": {
+    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n"
+  },
+  "B": {
+    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n",
+    "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n",
+    "h()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n"
+  }
+}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/custom_error-0.8.7-compact.json b/tests/ast-parsing/expected/custom_error-0.8.7-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/custom_error-0.8.7-compact.json
@@ -0,0 +1,16 @@
+{
+  "VendingMachine": {
+    "err0()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n",
+    "err1()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n",
+    "err2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n",
+    "err3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n"
+  },
+  "A": {
+    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n"
+  },
+  "B": {
+    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n",
+    "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n",
+    "h()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n"
+  }
+}
\ No newline at end of file
diff --git a/tests/ast-parsing/yul-0.7.5.sol b/tests/ast-parsing/yul-0.7.5.sol
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/yul-0.7.5.sol
@@ -0,0 +1,9 @@
+contract C {
+    function f(bytes calldata paramA) external returns (uint256 retA) {
+        assembly {
+            retA := paramA.offset
+            retA := add(retA, batchData.length)
+        }
+    }
+
+}