mojoshader_lexer.re
changeset 601 bb1484be4e1b
parent 597 832dbfa63509
child 616 9f087be64555
equal deleted inserted replaced
600:f42d58194dc1 601:bb1484be4e1b
   149     ANY             { goto bad_chars; }
   149     ANY             { goto bad_chars; }
   150 */
   150 */
   151 
   151 
   152 multilinecomment:
   152 multilinecomment:
   153     if (YYLIMIT == YYCURSOR)
   153     if (YYLIMIT == YYCURSOR)
   154         RET(TOKEN_PP_INCOMPLETE_COMMENT);
   154         RET(TOKEN_INCOMPLETE_COMMENT);
   155     matchptr = cursor;
   155     matchptr = cursor;
   156 // The "*\/" is just to avoid screwing up text editor syntax highlighting.
   156 // The "*\/" is just to avoid screwing up text editor syntax highlighting.
   157 /*!re2c
   157 /*!re2c
   158     "*\/"           {
   158     "*\/"           {
   159                         if (saw_newline)
   159                         if (saw_newline)
   178     ANY             { goto singlelinecomment; }
   178     ANY             { goto singlelinecomment; }
   179 */
   179 */
   180 
   180 
   181 bad_chars:
   181 bad_chars:
   182     if (YYLIMIT == YYCURSOR)
   182     if (YYLIMIT == YYCURSOR)
   183         RET(TOKEN_PP_BAD_CHARS);
   183         RET(TOKEN_BAD_CHARS);
   184 
   184 
   185 /*!re2c
   185 /*!re2c
   186     ANYLEGAL        { cursor--; RET(TOKEN_PP_BAD_CHARS); }
   186     ANYLEGAL        { cursor--; RET(TOKEN_BAD_CHARS); }
   187     ANY             { goto bad_chars; }
   187     ANY             { goto bad_chars; }
   188 */
   188 */
   189 
   189 
   190     assert(0 && "Shouldn't hit this code");
   190     assert(0 && "Shouldn't hit this code");
   191     RET(TOKEN_UNKNOWN);
   191     RET(TOKEN_UNKNOWN);