disable broken tests on net_4_0
[mcs.git] / docs / ecma334 / 9.5.7.xml
blob8824c261c845fa159d008741d95a871fea5d4481
1 <?xml version="1.0"?>
2 <clause number="9.5.7" title="Line directives">
3   <paragraph>Line directives may be used to alter the line numbers and source file names that are reported by the compiler in output such as warnings and errors. </paragraph>
4   <paragraph>
5     <note>[Note: Line directives are most commonly used in meta-programming tools that generate C# source code from some other text input. end note]</note>
6     <grammar_production><name><non_terminal where="9.5.7">pp-line</non_terminal></name> :: <rhs><non_terminal where="9.3.3">whitespace</non_terminal><opt/><terminal>#</terminal><non_terminal where="9.3.3">whitespace</non_terminal><opt/><terminal>line</terminal><non_terminal where="9.3.3">whitespace</non_terminal><non_terminal where="9.5.7">line-indicator</non_terminal><non_terminal where="9.5.3">pp-new-line</non_terminal></rhs></grammar_production>
7     <grammar_production><name><non_terminal where="9.5.7">line-indicator</non_terminal></name> :: <rhs><non_terminal where="9.4.4.2">decimal-digits</non_terminal><non_terminal where="9.3.3">whitespace</non_terminal><non_terminal where="9.5.7">file-name</non_terminal></rhs><rhs><non_terminal where="9.4.4.2">decimal-digits</non_terminal></rhs><rhs><terminal>default</terminal></rhs></grammar_production>
8     <grammar_production><name><non_terminal where="9.5.7">file-name</non_terminal></name> :: <rhs><terminal>&quot;</terminal><non_terminal where="9.5.7">file-name-characters</non_terminal><terminal>&quot;</terminal></rhs></grammar_production>
9     <grammar_production><name><non_terminal where="9.5.7">file-name-character</non_terminal>s</name> :: <rhs><non_terminal where="9.5.7">file-name-character</non_terminal></rhs><rhs><non_terminal where="9.5.7">file-name-characters</non_terminal><non_terminal where="9.5.7">file-name-character</non_terminal></rhs></grammar_production>
10     <grammar_production><name><non_terminal where="9.5.7">file-name-character</non_terminal></name> :: <rhs>Any character except &quot; (U+0022), and <non_terminal where="9.3.1">new-line</non_terminal> </rhs></grammar_production>
11   </paragraph>
12   <paragraph>When no <symbol>#line</symbol> directives are present, the compiler reports true line numbers and source file names in its output. When processing a <symbol>#line</symbol> directive that includes a <non_terminal where="9.5.7">line-indicator</non_terminal> that is not default, the compiler treats the line after the directive as having the given line number (and file name, if specified). </paragraph>
13   <paragraph>A <symbol>#line</symbol> default directive reverses the effect of all preceding <symbol>#line</symbol> directives. The compiler reports true line information for subsequent lines, precisely as if no <symbol>#line</symbol> directives had been processed. </paragraph>
14   <paragraph>
15     <note>[Note: Note that a <non_terminal where="9.5.7">file-name</non_terminal> differs from a regular string literal in that escape characters are not processed; the '\' character simply designates an ordinary back-slash character within a <non_terminal where="9.5.7">file-name</non_terminal>. end note]</note>
16   </paragraph>
17 </clause>