-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
CoreRelates to the core applicationRelates to the core applicationFeatureA new addition to the projectA new addition to the project
Description
It'd becoming a burden to constantly query and check the underlying types of literal values.
class Value final {}; // could be literal or variable. could be number, string, array, etc.This type would be intentionally non-generic. throwing runtime type exceptions instead, for the editor to handle.
// literals operate on literals, and return literals...
constexpr bool operator==(const Value& a, const Value& b) const; // evaluates type, checks equality
constexpr Value+(const Literal& a, const Value& b) const;
constexpr Value[]() const;
// etc.You can create values from primitive types
explicit Value(int value);
explicit Value(bool value);
// etc.and convert from them
constexpr bool (bool)() const;
constexpr std::string (std::string)() const;The editor should be responsible for ensuring the right types are used, and valid blocks and expressions are nested together.
Metadata
Metadata
Assignees
Labels
CoreRelates to the core applicationRelates to the core applicationFeatureA new addition to the projectA new addition to the project