Ejemplo n.º 1
0
 /// <summary>
 /// Function checks if current line ends with comment and consume it
 /// </summary>
 /// <returns></returns>
 private bool CurrentLineEndsWithComment()
 {
     if (_input.La(1) == '/' && _input.La(2) == '/')
     {
         while (_input.La(1) != '\n' && _input.La(1) != '\r' && _input.La(1) != Eof)
         {
             InputStream.Consume();
         }
         if (_input.La(1) == -1 || InWsaMode)
         {
             Emit(_currentToken);
             ExitInValueMode();
             //Emitting NEWLINE if not in WSA
             if (!InWsaMode)
             {
                 EmitIndentationToken(NEWLINE, CharIndex, CharIndex);
             }
         }
         else
         {
             Skip();
         }
         return(true);
     }
     return(false);
 }