Skip to content

Commit

Permalink
update the manual concerning line number directives
Browse files Browse the repository at this point in the history
reflects the change from ocaml#931 / ocaml#6604
  • Loading branch information
oandrieu committed Feb 11, 2021
1 parent 95a4963 commit 3370545
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions manual/src/refman/lex.etex
Expand Up @@ -302,16 +302,16 @@ longest first token.

\begin{syntax}
linenum-directive:
'#' {{"0" \ldots "9"}}
| '#' {{"0" \ldots "9"}} '"' { string-character } '"'
'#' {{"0" \ldots "9"}} '"' { string-character } '"'
\end{syntax}

Preprocessors that generate OCaml source code can insert line number
directives in their output so that error messages produced by the
compiler contain line numbers and file names referring to the source
file before preprocessing, instead of after preprocessing.
A line number directive is composed of a @"#"@ (sharp sign), followed by
a positive integer (the source line number), optionally followed by a
A line number directive starts at the beginning of a line,
is composed of a @"#"@ (sharp sign), followed by
a positive integer (the source line number), followed by a
character string (the source file name).
Line number directives are treated as blanks during lexical
analysis.
Expand Down

0 comments on commit 3370545

Please sign in to comment.