Commit 4a1260f
authored
Remove unnecessary duplicate code formatting implementation (#67)
For reasons that are not entirely clear, the code to format Technique
sources was almost entirely duplicated in the problem module used to
embellish code snippets used in examples when printing error messages.
Clean up this duplication.
Along the way made some improvements to the way tagging of fragments is
done by the formatter code, considerably reducing the amount of
allocation being done.
While we have a fairly extensive battery of parsing and formatting
tests, the only real way to ensure the overall shape of the output is
correct is to have a set of golden tests comparing known-good inputs
that must be identical after being formatted. Add a test case which
works through any files in _examples/golden/_ and fail if differences
are detected.File tree
12 files changed
+502
-496
lines changed- examples/golden
- src
- formatting
- language
- parsing
- problem
- regex
- tests
- formatting
12 files changed
+502
-496
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments