From b3988bccadc4fdff61a44c60f172985f39b6651c Mon Sep 17 00:00:00 2001 From: Frank Hampus Weslien Date: Sun, 30 Jul 2023 15:14:21 +0200 Subject: [PATCH] Add codeblocks for example errors --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 74d9881..fc75c5f 100644 --- a/README.md +++ b/README.md @@ -64,15 +64,19 @@ So the defaults are nice, but sometimes the easiest way to write a parser is to Most parsers tell you the row and column of the problem: +```txt Something went wrong at (4:17) +``` That may be true, but it is not how humans think. It is how text editors think! It would be better to say: +```txt I found a problem with this list: [ 1, 23zm5, 3 ] ^ I wanted an integer, like 6 or 90219. +``` Notice that the error messages says `this list`. That is context! That is the language my brain speaks, not rows and columns.