4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta name="generator" content="AsciiDoc 8.6.9">
6 <title>LineDirective</title>
7 <link rel="stylesheet" href="./asciidoc.css" type="text/css">
8 <link rel="stylesheet" href="./pygments.css" type="text/css">
11 <script type="text/javascript" src="./asciidoc.js"></script>
12 <script type="text/javascript">
17 <link rel="stylesheet" href="./mlton.css" type="text/css">
19 <body class="article">
21 <div id="banner-home">
22 <a href="./Home">MLton 20180207</a>
26 <h1>LineDirective</h1>
30 <div class="sectionbody">
31 <div class="paragraph"><p>To aid in the debugging of code produced by program generators such
32 as <a href="http://www.eecs.harvard.edu/%7Enr/noweb/">Noweb</a>, MLton supports
33 comments with line directives of the form</p></div>
34 <div class="listingblock">
35 <div class="content"><div class="highlight"><pre><span class="cm">(*#line l.c "f"*)</span><span class="w"></span>
36 </pre></div></div></div>
37 <div class="paragraph"><p>Here, <em>l</em> and <em>c</em> are sequences of decimal digits and <em>f</em> is the
38 source file. The first character of a source file has the position
39 1.1. A line directive causes the front end to believe that the
40 character following the right parenthesis is at the line and column of
41 the specified file. A line directive only affects the reporting of
42 error messages and does not affect program semantics (except for
43 functions like <span class="monospaced">MLton.Exn.history</span> that report source file positions).
44 Syntactically invalid line directives are ignored. To prevent
45 incompatibilities with SML, the file name may not contain the
46 character sequence <span class="monospaced">*)</span>.</p></div>
50 <div id="footnotes"><hr></div>
52 <div id="footer-text">
54 <div id="footer-badges">