Add error logging and corresponding tests for parser syntax errors

This commit is contained in:
2026-04-25 14:37:08 +02:00
parent 7c7e0c3272
commit 91593e12b7
8 changed files with 70 additions and 15 deletions
+4
View File
@@ -0,0 +1,4 @@
--- test.c ---
1| module my_module; import ;
^
expected module name to import
-4
View File
@@ -1,4 +0,0 @@
--- test.c ---
1| import other_module.c
^^^^^^
expected `module`
+4
View File
@@ -0,0 +1,4 @@
--- test.c ---
1| import other_module;
^^^^^^
expected 'module' keyword
+4
View File
@@ -0,0 +1,4 @@
--- test.c ---
1| module my_module; import other_module
^
expected ';' after import
+4
View File
@@ -0,0 +1,4 @@
--- test.c ---
1| module my_module
^
expected ';' after module name