Add missing cassert includes
This commit is contained in:
parent
90d21adf3b
commit
416cbb9def
4 changed files with 12 additions and 14 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#include <vector>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <cassert>
|
||||
#include "compiler/grammar.h"
|
||||
#include "compiler/rule.h"
|
||||
|
||||
|
|
@ -12,13 +13,8 @@ using std::string;
|
|||
using std::vector;
|
||||
using std::pair;
|
||||
using std::to_string;
|
||||
using std::make_shared;
|
||||
using rules::Blank;
|
||||
using rules::Choice;
|
||||
using rules::Repeat;
|
||||
using rules::Seq;
|
||||
using rules::Symbol;
|
||||
using rules::Rule;
|
||||
using rules::Symbol;
|
||||
|
||||
class ExpandRepeats {
|
||||
string rule_name;
|
||||
|
|
@ -61,8 +57,8 @@ class ExpandRepeats {
|
|||
aux_rules.push_back({
|
||||
helper_rule_name,
|
||||
VariableTypeAuxiliary,
|
||||
Choice{{
|
||||
Seq{repeat_symbol, inner_rule},
|
||||
rules::Choice{{
|
||||
rules::Seq{repeat_symbol, inner_rule},
|
||||
inner_rule,
|
||||
}}
|
||||
});
|
||||
|
|
@ -74,8 +70,8 @@ class ExpandRepeats {
|
|||
},
|
||||
|
||||
[](auto) {
|
||||
assert(false);
|
||||
return Blank{};
|
||||
assert(!"Unexpected rule type");
|
||||
return rules::Blank{};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "compiler/prepare_grammar/extract_tokens.h"
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <assert.h>
|
||||
#include <cassert>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
|
@ -62,7 +62,7 @@ class SymbolReplacer {
|
|||
},
|
||||
|
||||
[](auto) {
|
||||
assert(false);
|
||||
assert(!"Unexpected rule type");
|
||||
return rules::Blank{};
|
||||
}
|
||||
);
|
||||
|
|
@ -152,7 +152,7 @@ class TokenExtractor {
|
|||
},
|
||||
|
||||
[](auto) {
|
||||
assert(false);
|
||||
assert(!"Unexpected rule type");
|
||||
return rules::Blank{};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "compiler/prepare_grammar/flatten_grammar.h"
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
#include <algorithm>
|
||||
#include "compiler/prepare_grammar/extract_choices.h"
|
||||
#include "compiler/prepare_grammar/initial_syntax_grammar.h"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include "compiler/prepare_grammar/intern_symbols.h"
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
#include <set>
|
||||
#include "tree_sitter/compiler.h"
|
||||
#include "compiler/grammar.h"
|
||||
|
|
@ -54,7 +55,7 @@ class SymbolInterner {
|
|||
},
|
||||
|
||||
[](auto) {
|
||||
assert(false);
|
||||
assert(!"Unexpected rule type");
|
||||
return rules::Blank{};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue