Commit d988991
authored
[flang] Tokenize all -D macro bodies, and do it better (#168116)
The compiler presently tokenizes the bodies of only function-like macro
definitions from the command line, and does so crudely. Tokenize
keyword-like macros too, get character literals right, and handle
numeric constants correctly. (Also delete two needless functions noticed
in characters.h.)
Fixes #168077.1 parent c2445d9 commit d988991
File tree
4 files changed
+51
-23
lines changed- flang
- include/flang/Parser
- lib/Parser
- test/Preprocessing
4 files changed
+51
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | 72 | | |
77 | 73 | | |
78 | 74 | | |
| |||
85 | 81 | | |
86 | 82 | | |
87 | 83 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | 84 | | |
93 | 85 | | |
94 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| |||
371 | 374 | | |
372 | 375 | | |
373 | 376 | | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
382 | 381 | | |
383 | | - | |
384 | | - | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
385 | 416 | | |
386 | 417 | | |
387 | | - | |
388 | | - | |
389 | 418 | | |
| 419 | + | |
390 | 420 | | |
391 | 421 | | |
392 | 422 | | |
393 | 423 | | |
394 | 424 | | |
| 425 | + | |
395 | 426 | | |
396 | 427 | | |
397 | 428 | | |
398 | 429 | | |
399 | 430 | | |
400 | 431 | | |
401 | | - | |
402 | 432 | | |
403 | 433 | | |
404 | 434 | | |
405 | 435 | | |
406 | | - | |
407 | | - | |
| 436 | + | |
408 | 437 | | |
409 | 438 | | |
410 | 439 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
0 commit comments