diff options
Diffstat (limited to 'deps/v8/src/torque/earley-parser.cc')
-rw-r--r-- | deps/v8/src/torque/earley-parser.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/deps/v8/src/torque/earley-parser.cc b/deps/v8/src/torque/earley-parser.cc index 9ebb132c82..7326996c70 100644 --- a/deps/v8/src/torque/earley-parser.cc +++ b/deps/v8/src/torque/earley-parser.cc @@ -18,11 +18,12 @@ namespace torque { namespace { struct LineAndColumnTracker { - LineAndColumn previous{0, 0}; - LineAndColumn current{0, 0}; + LineAndColumn previous{0, 0, 0}; + LineAndColumn current{0, 0, 0}; void Advance(InputPosition from, InputPosition to) { previous = current; + current.offset += std::distance(from, to); while (from != to) { if (*from == '\n') { current.line += 1; @@ -187,7 +188,8 @@ const Item* RunEarleyAlgorithm( // Worklist for items at the next position. std::vector<Item> future_items; CurrentSourcePosition::Scope source_position( - SourcePosition{CurrentSourceFile::Get(), {0, 0}, {0, 0}}); + SourcePosition{CurrentSourceFile::Get(), LineAndColumn::Invalid(), + LineAndColumn::Invalid()}); std::vector<const Item*> completed_items; std::unordered_map<std::pair<size_t, Symbol*>, std::set<const Item*>, base::hash<std::pair<size_t, Symbol*>>> |