1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//! Semantic analysis library for VB6 code.
//!
//! This library provides tools for analyzing the semantics of VB6 code, including:
//! - Scope management and symbol resolution
//! - Type checking and inference
//! - Name resolution and disambiguation
//! - Error reporting and diagnostics
//!
//! The main entry point is the `SemanticAnalyzer` struct, which can analyze VB6
//! project files and produce a detailed analysis result. The library is designed
//! to be used in conjunction with the `vb6parse` library for parsing VB6 code from
//! source files into a CST (Concrete Syntax Tree).
//!
//! # Examples
//!
//! ```rust, no_run
//! use vb6semantic::SemanticAnalyzer;
//! use vb6parse::io::SourceFile;
//! use vb6parse::files::ProjectFile;
//!
//! let mut analyzer = SemanticAnalyzer::new();
//! let project_source = SourceFile::from_file("MyProject.vbp").expect("Failed to read project file");
//! let (project_opt, failures) = ProjectFile::parse(&project_source).unpack();
//! if !failures.is_empty() {
//! eprintln!("Failed to parse project file: {:?}", failures);
//! return;
//! }
//!
//! let project = project_opt.expect("Project file should have parsed successfully");
//!
//! let analysis_result = analyzer.analyze_project(&project).expect("Failed to analyze project");
//! println!("Analysis completed with {} errors and {} warnings", analysis_result.errors.len(), analysis_result.warnings.len());
//! ```
// wasm module for playground use.
// Re-export core types
/// Semantic analysis engine for VB6 projects.
pub use SemanticAnalyzer;
/// Semantic analysis errors and results.
pub use ;
/// Resolved references registry and resolvers.
pub use ;
/// Name resolution across scopes.
pub use NameResolver;
/// Scope management for symbol lookup.
pub use ;
/// A symbol in the symbol table.
pub use ;
/// Type checking and inference.
pub use ;
/// VB6 type definition (re-exported from vb6core).
pub use VBType;
/// Version of the semantic analysis library
pub const VERSION: &str = env!;