mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
bistromathic: do not display parse errors on completion
Currently autocompletion on a line with errors leaks the error messages. It can be useful to let the user know, but GNU Readline does not provide us with an nice way to display the error. So we actually break into the current line of the user. So instead, do not show these errors. * examples/c/bistromathic/parse.y (user_context): New. Use %param to pass it to the parser and scanner. Keep quiet when in computing autocompletion.
This commit is contained in:
@@ -314,7 +314,6 @@ EOF
|
||||
run -n 0 '> 1++ ''
|
||||
> ''
|
||||
err: 1.3: syntax error: expected - or ( or number or function or variable before +
|
||||
err: 1.3: syntax error: expected - or ( or number or function or variable before +
|
||||
'
|
||||
|
||||
# And even when the error was recovered from.
|
||||
@@ -324,7 +323,5 @@ EOF
|
||||
run -n 0 '> (1++2) + 3 + ''
|
||||
> ''
|
||||
err: 1.4: syntax error: expected - or ( or number or function or variable before +
|
||||
err: 1.4: syntax error: expected - or ( or number or function or variable before +
|
||||
err: 1.4: syntax error: expected - or ( or number or function or variable before +
|
||||
err: 1.15: syntax error: expected - or ( or number or function or variable before end of file
|
||||
'
|
||||
|
||||
Reference in New Issue
Block a user