Overview
VB6Semantic is the semantic analysis layer for the VB6 toolchain. It consumes the
parsed file objects produced by vb6parse
(ProjectFile, ModuleFile, ClassFile, FormFile)
and turns them into symbol tables, hierarchical scopes, resolved names, and validated types.
The analyzer performs type checking, enforces Public/Private/Friend visibility rules, and reports detailed semantic errors and warnings with source locations. Its output is consumed by the conversion, compilation, and interpretation paths, and it provides the symbol information needed for IDE features like code completion, go-to-definition, and find-references.
Key Features
🏷️ Symbol Tables
Comprehensive symbol tables for VB6 projects: variables, constants, procedures, properties, classes, controls, enums, and user-defined types
📂 Scope Management
Hierarchical scope management (global, module, class, procedure, block) with correct VB6 resolution order
🔍 Name Resolution
Resolve symbol references with proper scoping and visibility rules, including qualified names and accessibility checks
✅ Type Checking
Validate assignments and operations against VB6 type rules, including numeric promotion and Variant compatibility
🔒 Visibility Rules
Enforce Public/Private/Friend visibility across modules, classes, and projects
📢 Error Reporting
Detailed semantic errors and warnings with source locations, error categories, and related context
Architecture
VB6Semantic is built as a layered pipeline that transforms parsed VB6 files into a fully-resolved semantic model. Each layer builds on the previous one, giving tools the ability to hook into the analysis at any level.
Community & Contributing
VB6Semantic is open source and welcomes contributions! Whether you're reporting bugs, suggesting features, or submitting pull requests, your help is appreciated.