mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:18:12 +00:00
LibDiff: Make Diff::from_text fallible
This commit is contained in:
parent
23df5748f6
commit
ee92378b80
5 changed files with 22 additions and 17 deletions
|
@ -55,7 +55,7 @@ void SemanticSyntaxHighlighter::rehighlight(Palette const& palette)
|
|||
|
||||
// FIXME: Computing the diff on the entire document's tokens is quite inefficient.
|
||||
// An improvement over this could be only including the tokens that are in edited text ranges in the diff.
|
||||
auto diff_hunks = Diff::from_text(previous.view(), current.view());
|
||||
auto diff_hunks = Diff::from_text(previous.view(), current.view()).release_value_but_fixme_should_propagate_errors();
|
||||
for (auto& token : current_tokens) {
|
||||
new_tokens_info.append(CodeComprehension::TokenInfo { CodeComprehension::TokenInfo::SemanticType::Unknown,
|
||||
token.start().line, token.start().column, token.end().line, token.end().column });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue