-
66f42236
by Francis De Brabandere at 2026-04-21T21:40:30+02:00
vbscript: Track source location in const, class, and function declarations.
Add loc fields to const_decl_t and class_decl_t, and name_loc to
function_decl_t. These locations will be used to report precise error
positions for duplicate-declaration diagnostics.
-
eedb60b4
by Francis De Brabandere at 2026-04-21T21:40:30+02:00
vbscript: Return "Name redefined" error for duplicate global declarations.
Reject Dim/Const/Sub/Function/Class declarations whose names collide
at global scope with an earlier declaration of a different kind,
returning error 1041 instead of silently accepting the duplicate or
failing later with a generic error.
Only check for function name collisions when compiling at global scope.
Local Dim inside a Sub/Function/Property does not conflict with global
functions of the same name, matching Windows behavior.
-
d76c66b9
by Francis De Brabandere at 2026-04-21T21:40:30+02:00
vbscript: Return "Name redefined" error for duplicate class members.
Reject duplicate Sub/Function declarations inside a class, and any
Sub or Function declared with the same name as an existing class
member (Dim, Property, another Sub/Function), returning error 1041.
Report the error at the location of the second declaration using the
tracked name_loc, so the position matches Windows behavior.