Skip to content

Dev - #6

Merged
sergiorandria merged 9 commits into
mainfrom
dev
Sep 1, 2026
Merged

Dev#6
sergiorandria merged 9 commits into
mainfrom
dev

Conversation

@sergiorandria

Copy link
Copy Markdown
Owner

Description

Type of change

  • Bug fix
  • New feature
  • Performance / Refactor
  • Documentation
  • CI / Build

How Has This Been Tested?

Checklist

  • cmake -B build && cmake --build build -j passes
  • Tested with clang-format
  • Updated README.md / docs if needed
  • Added example or test if applicable

- prompt: colored cpp:C++23 [n] (time ✓/✗)> with version/counter/timing, NO_COLOR/--no-color support
- highlight: Highlighter for keywords/types/strings/comments after execution (▸)
- multiline: template <typename T>, requires/concept, struct/class, pointer decl without ; as incomplete
- stdlib: auto-include <bits/stdc++.h> (conditional -include) and on-demand retry for std:: symbols
- fix: make -include conditional to avoid fatal error in CI artifact (fix_np_headers.hpp)
- fix: pointer decl FILE *file; correctly parsed with * handling and same-value redefinition ignored
- fix: buffer replacement for FILE *file without ; + FILE *file; with ; to avoid duplicate redefinition
- add [code] label to highlighted echo (▸) and [runtime] to timing line (⏱) with [result]/[error]/[fix] labels
- ensure newline separation between prompt/input and Clang diagnostics (printError now starts with newline and [error]/[fix])
- highPrecisionDump now prints [result] label with colored type/value
- handle direct init b({0,2,4,6}) as well as = value in parseDeclaration (supports np::ndarray)
- keep -include conditional for fix_np_headers.hpp to avoid fatal error in CI artifact
- parseDeclaration now handles b({0,2,4,6}) as well as = value (for np::ndarray)
- keep conditional -include for fix_np_headers.hpp and isIncomplete for * without ;
- ensure prompt and highlight and timing have clear [code]/[runtime]/[result]/[error] labels
- extract config::InterpreterConfig/SessionConfig/ReplConfig (replaces 4 overloads)
- centralize isIncomplete heuristics into utils::IncompleteDetector (single source, testable)
- add utils::Logger abstraction (testable, respects NO_COLOR)
- split build into cpp-repl-core STATIC library + cpp-repl thin executable (enables tests)
- modern CMake: GNUInstallDirs, version.h generation (PROJECT_VERSION + GIT_SHA), CPack DEB/TGZ, cpp-replConfig.cmake export, ENABLE_SANITIZERS/CLANG_TIDY, -Wall -Wextra, ccache, compile_commands.json
- add tests/ with GoogleTest (FetchContent or system GTest) for version_detector, highlight, incomplete_detector, interpreter_smoke
- add CHANGELOG.md (Keep a Changelog), CODE_OF_CONDUCT.md, Doxyfile, docs/architecture.md, vcpkg.json, .clang-tidy
- docs: architecture.md with dependency inversion, extension points, data flow, testing strategy
- keep all existing REPL features (prompt, highlight, multiline, stdlib, FILE/ndarray handling)
Flushes the JIT stack so already-defined variables no longer exist and can be redefined.
Aliases :forget, :clearstack, :drop map to full reset (future: per-var forget).
Resets prompt counter and timing, prints [flushed stack — all definitions cleared].
Add :flush/:forget/:clearstack/:drop to help text with description
'flush stack — clears all definitions (variables no longer exist, can be redefined)'.
… return type

Use auto -> bool for consistency with modern C++17 style.
Also handle import/export/module keywords correctly for VersionDetector.
Fixes VersionDetector.DetectsCpp23 test for 'export module foo;'.
- Result<T> pattern (utils::Result) replaces bool+string err anti-pattern
- IInterpreter Strategy + InterpreterFactory (Factory) for pluggable backends
- ICommand + CommandRegistry (Command/Registry) for REPL commands extensibility
- IVariableTracker Strategy (MapVariableTracker) for variable tracking, testable
- keep isIncomplete centralization and conditional -include for CI artifact
@sergiorandria
sergiorandria merged commit 371ca4b into main Sep 1, 2026
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant