csharpstandard icon indicating copy to clipboard operation
csharpstandard copied to clipboard

Pre-processing line directive

Open logeshkumars0604 opened this issue 1 year ago • 0 comments

Type of issue

Spec incorrect

Description

Reference: Pre-processing line directive

Production fragment:

fragment PP_Compilation_Unit_Name_Character
    // Any Input_Character except "
    : ~('\u000D' | '\u000A'   | '\u0085' | '\u2028' | '\u2029' | '#')
    ;
  1. The above production fragment says that '#' is not allowed for PP_Compilation_Unit_Name_Character. But I can be able to use it (in C# 10) .

  2. Also, the comment states that " can't be used in PP_Compilation_Unit_Name_Character. But it is not mentioned in the grammar.

Production fragment:

fragment PP_Compilation_Unit_Name
    : '"' PP_Compilation_Unit_Name_Character+ '"'
    ;

  1. The above production fragment says, at least one PP_Compilation_Unit_Name_Character. But I can be able to use an empty string ("").

Page URL

https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure

Content source URL

https://github.com/dotnet/csharpstandard/blob/draft-v8/standard/lexical-structure.md

logeshkumars0604 avatar May 24 '24 16:05 logeshkumars0604