3 ms·
Showing the boundary between accepted and rejected input is indeed a good idea. The case discussed in the article would benefit of a display with spaces betwee
by s_gourichon 7y ago
Showing the boundary between accepted and rejected input is indeed a good idea.
The case discussed in the article would benefit of a display with spaces between tokens.
Example:
Source: [01]
Compiler error:
[ 0 1 ]
----^
SyntaxError: JSON.parse: expected ‘,’ or ‘]’ after array element
Such situation of two tokens without a separator character becomes much more obvious.
Notice also the character showing point of error. OCaml has been doing for a while ( https://ocaml.org/learn/tutorials/common_error_messages.html https://ocaml.org/learn/tutorials/common_error_messages.html now shows underlined parts) then clang, cf. https://clang.llvm.org/diagnostics.html https://clang.llvm.org/diagnostics.html . This is much quicker for the human to communicate, than "line x column y".