diff options
author | Hop311 <Hop3114@gmail.com> | 2023-10-22 17:22:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-22 17:22:13 +0200 |
commit | efc11f571794acd64884680834c6636a03e8322b (patch) | |
tree | 5ae26ce32e536a9e0ca281785b297d014e66179d /include | |
parent | 0e3640b670932a597a8430588bd8ea3302126aab (diff) | |
parent | 7d5d86e44ebbd907c690023b4546a0ae0a37de3a (diff) |
Merge pull request #28 from OpenVicProject/say-thanks-to-non-breaking-space-breaking-everything-again
Add grammar support for BEL, HT, LF, and CR characters
Diffstat (limited to 'include')
-rw-r--r-- | include/openvic-dataloader/v2script/AbstractSyntaxTree.hpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/include/openvic-dataloader/v2script/AbstractSyntaxTree.hpp b/include/openvic-dataloader/v2script/AbstractSyntaxTree.hpp index 8ff910f..32e7e42 100644 --- a/include/openvic-dataloader/v2script/AbstractSyntaxTree.hpp +++ b/include/openvic-dataloader/v2script/AbstractSyntaxTree.hpp @@ -166,9 +166,9 @@ namespace ovdl::v2script::ast { struct AbstractStringNode : public Node { std::string _name; AbstractStringNode(); - AbstractStringNode(std::string&& name); + AbstractStringNode(std::string&& name, bool allow_newline); AbstractStringNode(NodeLocation location); - AbstractStringNode(NodeLocation location, std::string&& name); + AbstractStringNode(NodeLocation location, std::string&& name, bool allow_newline); OVDL_TYPE_DEFINE_SELF; OVDL_RT_TYPE_DEF; OVDL_PRINT_FUNC_DEF; @@ -176,17 +176,17 @@ namespace ovdl::v2script::ast { constexpr std::string_view get_base_type() const override { return ::ovdl::detail::type_name<std::decay_t<decltype(*this)>>(); } }; -#define OVDL_AST_STRING_NODE(NAME) \ - struct NAME final : public AbstractStringNode { \ - NAME(); \ - NAME(std::string&& name); \ - NAME(lexy::nullopt); \ - NAME(NodeLocation location); \ - NAME(NodeLocation location, std::string&& name); \ - NAME(NodeLocation location, lexy::nullopt); \ - OVDL_TYPE_DEFINE_SELF; \ - OVDL_RT_TYPE_DEF; \ - OVDL_PRINT_FUNC_DEF; \ +#define OVDL_AST_STRING_NODE(NAME) \ + struct NAME final : public AbstractStringNode { \ + NAME(); \ + NAME(std::string&& name, bool allow_newline = true); \ + NAME(lexy::nullopt); \ + NAME(NodeLocation location); \ + NAME(NodeLocation location, std::string&& name, bool allow_newline = true); \ + NAME(NodeLocation location, lexy::nullopt); \ + OVDL_TYPE_DEFINE_SELF; \ + OVDL_RT_TYPE_DEF; \ + OVDL_PRINT_FUNC_DEF; \ } // Value Expression Nodes |