Fix build errors w/ gcc

This commit is contained in:
Max Brunsfeld 2017-03-17 13:58:51 -07:00
parent 416cbb9def
commit d9fb863bea
5 changed files with 5 additions and 6 deletions

View file

@ -41,7 +41,7 @@ static set<uint32_t> add_chars(set<uint32_t> *left, const set<uint32_t> &right)
static vector<CharacterRange> consolidate_ranges(const set<uint32_t> &chars) {
vector<CharacterRange> result;
for (uint32_t c : chars) {
size_t size = result.size();
auto size = result.size();
if (size >= 2 && result[size - 2].max == (c - 2)) {
result.pop_back();
result.back().max = c;

View file

@ -3,6 +3,7 @@
#include <vector>
#include <set>
#include <cstdint>
namespace tree_sitter {
namespace rules {