Commit c0fc7ba9 authored by Kenton Varda's avatar Kenton Varda

Fix parse error location on empty statement.

parent 4305327c
......@@ -1006,7 +1006,7 @@ kj::Maybe<Orphan<Declaration>> CapnpParser::parseStatement(
} else if (tokens.end() != tokens.begin()) {
bestByte = (tokens.end() - 1)->getEndByte();
} else {
bestByte = 0;
bestByte = statement.getStartByte();
}
errorReporter.addError(bestByte, bestByte, "Parse error.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment