blob: 10f8348958a81c2b2bfda1b8e529022cea5c2c6c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#pragma once
#include <openvic-dataloader/v2script/AbstractSyntaxTree.hpp>
#include <lexy/callback.hpp>
#include <lexy/dsl.hpp>
#include "SimpleGrammar.hpp"
#include "detail/dsl.hpp"
namespace ovdl::v2script::grammar {
struct EffectStatement {
static constexpr auto rule = lexy::dsl::p<SAssignStatement<StringEscapeOption>>;
static constexpr auto value = lexy::forward<ast::AssignStatement*>;
};
struct EffectList {
static constexpr auto rule = lexy::dsl::list(lexy::dsl::p<EffectStatement>);
static constexpr auto value = lexy::as_list<ast::AssignStatementList>;
};
struct EffectBlock {
static constexpr auto rule = dsl::curly_bracketed.opt(lexy::dsl::p<EffectList>);
static constexpr auto value = construct_list<ast::ListValue>;
};
}
|