Beispiel #1
0
 /*
  * Method:  MatchNextIdentifierStart
  *
  * Determine whether a given character is a C# or VB identifier start character.
  * Both languages agree on this format.
  */
 internal bool MatchNextIdentifierStart()
 {
     // From 2.4.2 of the C# Language Specification
     // identifier-start-letter-character:
     if (CurrentCharacter == '_' || TokenChar.IsLetter(CurrentCharacter))
     {
         return(true);
     }
     return(false);
 }
Beispiel #2
0
 /*
  * Method:  SinkIdentifierPart
  *
  * Determine whether a given character is a C# or VB identifier part character
  * Both languages agree on this format.
  */
 internal bool SinkIdentifierPart()
 {
     // From 2.4.2 of the C# Language Specification
     // identifier-part-letter-character:
     if (
         TokenChar.IsLetter(CurrentCharacter) ||
         TokenChar.IsDecimalDigit(CurrentCharacter) ||
         TokenChar.IsConnecting(CurrentCharacter) ||
         TokenChar.IsCombining(CurrentCharacter) ||
         TokenChar.IsFormatting(CurrentCharacter)
         )
     {
         Skip();
         return(true);
     }
     return(false);
 }