Repository navigation
Commit 1ddce7c
Patrick Quist
Report a syntax error at its line, not its column
TPasSyntaxTreeBuilder.Run turns an ESyntaxError into an ESyntaxTreeException,
whose constructor takes the line first and the column second. It passed
E.PosXY.X, E.PosXY.Y, but TmwBasePasLex.GetPosXY puts the column in X and the
line in Y, so the two came out swapped. The EParserException path next to it
was right; ParserMessage already passes Y, X.
ESyntaxError is what ExpectedFatal raises, which is how an unexpected end of
file is reported. A unit that stops after the `begin` of a routine on line 5
unit Broken;
interface
implementation
procedure Run;
begin
was reported at line 6, col 5 instead of line 5, col 6.1 parent 9bb8fbf commit 1ddce7c
2 files changed
Lines changed: 24 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2672 | 2672 | | |
2673 | 2673 | | |
2674 | 2674 | | |
2675 | | - | |
| 2675 | + | |
2676 | 2676 | | |
2677 | 2677 | | |
2678 | 2678 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
261 | 283 | | |
262 | 284 | | |
263 | 285 | | |
| |||
296 | 318 | | |
297 | 319 | | |
298 | 320 | | |
| 321 | + | |
299 | 322 | | |
300 | 323 | | |
301 | 324 | | |
| |||
0 commit comments