LSP: changed callbacks auto-completion

ChangeLog: LSP: auto-completion of changed callbacks
This commit is contained in:
Olivier Goffart 2024-09-26 15:13:54 +02:00
parent 61565e1ba9
commit cfa115affa
4 changed files with 151 additions and 6 deletions

View file

@ -101,10 +101,15 @@ pub fn parse_element_content(p: &mut impl Parser) {
parse_transitions(&mut *p);
}
_ => {
p.consume();
if !had_parse_error {
p.error("Parse error");
had_parse_error = true;
if p.peek().as_str() == "changed" {
// Try to recover some errors
parse_changed_callback(&mut *p);
} else {
p.consume();
if !had_parse_error {
p.error("Parse error");
had_parse_error = true;
}
}
}
},