Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / localhost / LineDirective
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
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">
9
10
11 <script type="text/javascript" src="./asciidoc.js"></script>
12 <script type="text/javascript">
13 /*<![CDATA[*/
14 asciidoc.install();
15 /*]]>*/
16 </script>
17 <link rel="stylesheet" href="./mlton.css" type="text/css">
18 </head>
19 <body class="article">
20 <div id="banner">
21 <div id="banner-home">
22 <a href="./Home">MLton 20180207</a>
23 </div>
24 </div>
25 <div id="header">
26 <h1>LineDirective</h1>
27 </div>
28 <div id="content">
29 <div id="preamble">
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 &quot;f&quot;*)</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>
47 </div>
48 </div>
49 </div>
50 <div id="footnotes"><hr></div>
51 <div id="footer">
52 <div id="footer-text">
53 </div>
54 <div id="footer-badges">
55 </div>
56 </div>
57 </body>
58 </html>