mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 11:51:04 +01:00
Underline the entire token when producing diagnostic messages. (#3413)
This is an incremental improvement on our diagnostic messages that simply underlines an entire token if the token is larger than 1 char (else it points to the single char with a caret like it used to).
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@
|
||||
|
||||
// CHECK:STDERR: fail_identifier_instead_of_sig.carbon:[[@LINE+3]]:8: ERROR: `fn` requires a `(` for parameters.
|
||||
// CHECK:STDERR: fn foo bar;
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: ^~~
|
||||
fn foo bar;
|
||||
|
||||
// CHECK:STDOUT: - filename: fail_identifier_instead_of_sig.carbon
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
|
||||
// CHECK:STDERR: fail_repeated_fn_and_semi.carbon:[[@LINE+3]]:4: ERROR: `fn` introducer should be followed by a name.
|
||||
// CHECK:STDERR: fn fn;
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: ^~
|
||||
fn fn;
|
||||
|
||||
// CHECK:STDOUT: - filename: fail_repeated_fn_and_semi.carbon
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
|
||||
// CHECK:STDERR: fail_skip_without_semi_to_curly.carbon:[[@LINE+3]]:1: ERROR: Unrecognized declaration introducer.
|
||||
// CHECK:STDERR: struct X { fn () }
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: ^~~~~~
|
||||
struct X { fn () }
|
||||
fn F();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user