Commit log

3942ee8 move more snapshots to new visuals

Phillip Davis created

4e414bd clean up the test funcs

Phillip Davis created

44bf6b9 Merge branch 'snapshot-framework'

Phillip Davis created

5a5242a feat(snapshots): visual error reporting

Click to expand commit body
Implements comprehensive visual error reporting system:

Visual Span Rendering:
- Unicode box-drawing characters (─┬└) mark spans directly on
  source code
- Line numbers and gutter formatting for readability
- Multi-line span support with continuation markers (│)
- Context lines (1-2 before/after) for better context

Escaped Character Display:
- Invisible characters (\r, \n, \t, \) shown escaped in visual output
- Column calculations account for escaped character width
- Errors on invisible input now actually visible

Parser Context Integration:
- All parsers labeled with nibble.in() for error tracking
- Error messages show which parser failed: [in "end_of_line"]
- Full call chain displayed for nested parsers
- Context type changed from generic ctx to concrete String

Enhanced Error Format:
- Each error shows input with visual span markers
- Parser call chain: "↳ called from X"
- Readable error reasons: "Expected X, but got Y"
- Escape sequences visible in both input and markers

Test Updates:
- Migrated tests to use snapshot_helpers
- Added demo test showcasing visual features
- Updated assertions to accept parser context
- Regenerated all snapshots with new visual format

Phillip Davis created

4c68d7f whsp1 test

Phillip Davis created

a57091b end-of-line tests

Phillip Davis created

f7d8860 keyword parser + test of multiline lexing

Click to expand commit body
- add birdie for more sane testing
- parsing '\n' results in col_end=0 always, and also row_end = row_start
  + 1 always. This kind of annoying, but I think fine.

Phillip Davis created

aa795fc add license

Phillip Davis created

abb4d44 initial commit

Phillip Davis created