Debian Codegraph @

doc/guide/src/LineDirective.adoc

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