Commit Graph

3 Commits

Author SHA1 Message Date
9304b6bcaa refactor: restructure CLI into library crate and add semantic analysis phase
Restructure nxc-cli crate:
- Extract main logic into lib.rs with main_entry() function
- Move nexacore binary to separate bin/nexacore.rs file
- Keep nxc binary in main.rs as thin wrapper

Add semantic analysis to compilation pipeline:
- Implement semantic analyzer with type checking and name resolution
- Add Type enum with Int, Float, Bool, String, Void, Struct, Function, Error variants
- Add typed AST nodes (TypedModule, TypedFunction
2026-04-06 17:13:34 +02:00
dfd2f10234 feat: add diagnostic system and improve CLI with check command
Implement comprehensive diagnostic reporting system:
- Add Diagnostic struct with severity levels and span-based error tracking
- Add diagnostic rendering with source context and caret positioning
- Replace ParseError with diagnostic collection in lexer and parser
- Add LexResult and ParseResult types to carry diagnostics

Enhance driver crate with frontend output:
- Replace CompileResult with FrontendOutput containing diagnostics
- Add has_errors() and render_diagnostics() methods
- Add AstSummary for
2026-04-06 17:07:50 +02:00
0da224325a chore: initialize NexaCore compiler workspace with basic frontend and CLI
Add initial project structure for NexaCore programming language compiler:
- Create Cargo workspace with 4 crates (cli, driver, frontend, runtime)
- Add lexer with indentation-based tokenization and keyword support
- Add parser for modules, functions, structs, and basic expressions
- Implement CLI with build command and placeholder subcommands
- Add driver crate to orchestrate compilation pipeline
- Include .gitignore for Rust build
2026-04-06 16:57:54 +02:00