mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2026-04-30 19:09:26 +08:00
* Fix #17: Add const local variable support to ChaiScript Adds `const var`, `const auto`, and `const` as variable declaration syntax that creates immutable local variables. A const_override flag on Boxed_Value enables script-level constness without changing the C++ type system integration. The parser, optimizer, and evaluator are extended with Const_Var_Decl and Const_Assign_Decl AST nodes that mirror their non-const counterparts but mark the value as const after initialization. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Address review: remove const_override, set const flag directly on Type_Info Replace the m_const_override bool on Boxed_Value::Data with a Type_Info::make_const() method that sets the const bit in m_flags directly. This ensures constness is visible everywhere consistently, including places that check get_type_info().is_const() directly. Requested by @lefticus in PR #643 review. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: leftibot <leftibot@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| chaiscript_algebraic.hpp | ||
| chaiscript_common.hpp | ||
| chaiscript_engine.hpp | ||
| chaiscript_eval.hpp | ||
| chaiscript_optimizer.hpp | ||
| chaiscript_parser.hpp | ||
| chaiscript_posix.hpp | ||
| chaiscript_prelude_docs.hpp | ||
| chaiscript_prelude.hpp | ||
| chaiscript_tracer.hpp | ||
| chaiscript_unknown.hpp | ||
| chaiscript_windows.hpp | ||