Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | LineDirective |
2 | ============= | |
3 | ||
4 | To aid in the debugging of code produced by program generators such | |
5 | as http://www.eecs.harvard.edu/%7Enr/noweb/[Noweb], MLton supports | |
6 | comments with line directives of the form | |
7 | [source,sml] | |
8 | ---- | |
9 | (*#line l.c "f"*) | |
10 | ---- | |
11 | Here, _l_ and _c_ are sequences of decimal digits and _f_ is the | |
12 | source file. The first character of a source file has the position | |
13 | 1.1. A line directive causes the front end to believe that the | |
14 | character following the right parenthesis is at the line and column of | |
15 | the specified file. A line directive only affects the reporting of | |
16 | error messages and does not affect program semantics (except for | |
17 | functions like `MLton.Exn.history` that report source file positions). | |
18 | Syntactically invalid line directives are ignored. To prevent | |
19 | incompatibilities with SML, the file name may not contain the | |
20 | character sequence `*)`. |