@@ -144,8 +144,10 @@ enum PrimitiveCoreType
144
144
/* Macros */ \
145
145
RS_TOKEN (DOLLAR_SIGN, " $" ) \
146
146
/* Doc Comments */ \
147
- RS_TOKEN (INNER_DOC_COMMENT, " #![doc]" ) \
148
- RS_TOKEN (OUTER_DOC_COMMENT, " #[doc]" ) \
147
+ RS_TOKEN (INNER_DOC_COMMENT, " /**!" ) \
148
+ RS_TOKEN (OUTER_DOC_COMMENT, " /**" ) \
149
+ RS_TOKEN (DOC_COMMENT_END, " */" ) \
150
+ RS_TOKEN (DOC_STRING_LITERAL, " string" ) \
149
151
RS_TOKEN_KEYWORD_2015 (ABSTRACT, " abstract" ) /* unused */ \
150
152
RS_TOKEN_KEYWORD_2015 (AS, " as" ) \
151
153
RS_TOKEN_KEYWORD_2018 (ASYNC, " async" ) /* unused */ \
@@ -396,6 +398,11 @@ class Token
396
398
return TokenPtr (new Token (OUTER_DOC_COMMENT, locus, std::move (str)));
397
399
}
398
400
401
+ static TokenPtr make_doc_string_literal (location_t locus, std::string &&str)
402
+ {
403
+ return TokenPtr (new Token (DOC_STRING_LITERAL, locus, std::move (str)));
404
+ }
405
+
399
406
// Makes and returns a new TokenPtr of type LIFETIME.
400
407
static TokenPtr make_lifetime (location_t locus, std::string &&str)
401
408
{
@@ -458,6 +465,7 @@ return *str;
458
465
case BYTE_CHAR_LITERAL:
459
466
case BYTE_STRING_LITERAL:
460
467
case RAW_STRING_LITERAL:
468
+ case DOC_STRING_LITERAL:
461
469
return true ;
462
470
default :
463
471
return false ;
0 commit comments