Commit ee2eb81
committed
[parse] Add checkers and errors for parse_return and parse_scope
I have fixed the grammar for parse_return to be:
`return` <expr> `;`
This means that there must be an <expr> mandatorily after the `return`
keyword. This fixes residual curly brackets, that should have thrown an
error, as shown in tests/test_missing_curly.ql test.
Also, it breaks no EOF test.
Signed-off-by: Manas <manas18244@iiitd.ac.in>1 parent 876111e commit ee2eb81
3 files changed
+30
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
267 | 270 | | |
268 | 271 | | |
269 | 272 | | |
| |||
395 | 398 | | |
396 | 399 | | |
397 | 400 | | |
| 401 | + | |
398 | 402 | | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
405 | 407 | | |
406 | | - | |
407 | | - | |
408 | | - | |
| 408 | + | |
409 | 409 | | |
410 | | - | |
| 410 | + | |
| 411 | + | |
411 | 412 | | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
412 | 416 | | |
413 | 417 | | |
414 | 418 | | |
| |||
729 | 733 | | |
730 | 734 | | |
731 | 735 | | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
732 | 741 | | |
733 | 742 | | |
734 | 743 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
| 368 | + | |
| 369 | + | |
368 | 370 | | |
369 | 371 | | |
370 | 372 | | |
| |||
0 commit comments