use proper name for paren tokens

This commit is contained in:
PgBiel 2024-06-24 19:21:33 -03:00
parent c7d97a7248
commit d35a563b3c
2 changed files with 5 additions and 5 deletions

View File

@ -257,7 +257,7 @@ impl Lexer<'_> {
let current_start = self.s.cursor();
if !self.s.eat_if('(') {
self.s.eat_until(is_newline);
subtree.push(self.emit_error("expected left parenthesis", current_start));
subtree.push(self.emit_error("expected opening paren", current_start));
// Return a single error node until the end of the decorator.
return SyntaxNode::inner(SyntaxKind::Decorator, subtree);
@ -317,7 +317,7 @@ impl Lexer<'_> {
// Right parenthesis (covered above)
if !finished {
subtree.push(self.emit_error("expected right parenthesis", self.s.cursor()));
subtree.push(self.emit_error("expected closing paren", self.s.cursor()));
}
SyntaxNode::inner(SyntaxKind::Decorator, subtree)

View File

@ -49,18 +49,18 @@ this is ok
// Error: 4-18 expected identifier
/! 555!**INVALID!
// Error: 9-12 expected left parenthesis
// Error: 9-12 expected opening paren
/! allow)")
// Error: 10-14 unclosed string
// Error: 14 expected right parenthesis
// Error: 14 expected closing paren
/! allow("abc
// Error: 17-20 expected whitespace
/! allow("abc") abc
// Error: 16-26 expected comma
// Error: 26 expected right parenthesis
// Error: 26 expected closing paren
/! allow("abc" "abc") abc
// Error: 16-21 expected comma