leftibot 20ed7e3410 Fix #19: Add strongly-typed enum support to ChaiScript
Adds the ability to define enums inside ChaiScript with syntax:
  enum Color { Red, Green, Blue }
  enum Priority { Low = 10, Medium = 20, High = 30 }

Enum values are strongly typed Dynamic_Objects accessed via :: syntax
(e.g. Color::Red). A validating constructor from int is registered that
rejects values outside the defined range. Functions declared with an enum
parameter type (e.g. def fun(Color val)) correctly reject plain integers,
enforcing type safety at the dispatch level.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 17:45:47 -06:00
..
chaiscript Fix #19: Add strongly-typed enum support to ChaiScript 2026-04-13 17:45:47 -06:00