Dev - #6
Merged
Merged
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Type of change
How Has This Been Tested?
Checklist
cmake -B build && cmake --build build -jpassesclang-formatREADME.md/ docs if needed