File tree Expand file tree Collapse file tree 4 files changed +23
-0
lines changed Expand file tree Collapse file tree 4 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -1563,6 +1563,20 @@ void Lexer::scanKeyword8()
1563
1563
}
1564
1564
break ;
1565
1565
1566
+ case ' n' :
1567
+ if (*(cursor + 1 ) == ' o' &&
1568
+ *(cursor + 2 ) == ' e' &&
1569
+ *(cursor + 3 ) == ' x' &&
1570
+ *(cursor + 4 ) == ' c' &&
1571
+ *(cursor + 5 ) == ' e' &&
1572
+ *(cursor + 6 ) == ' p' &&
1573
+ *(cursor + 7 ) == ' t' )
1574
+ {
1575
+ token_stream[(int ) index++].kind = Token_noexcept;
1576
+ return ;
1577
+ }
1578
+ break ;
1579
+
1566
1580
case ' o' :
1567
1581
if (*(cursor + 1 ) == ' p' &&
1568
1582
*(cursor + 2 ) == ' e' &&
Original file line number Diff line number Diff line change @@ -2109,6 +2109,13 @@ bool Parser::parseExceptionSpecification(ExceptionSpecificationAST *&node)
2109
2109
{
2110
2110
std::size_t start = token_stream.cursor ();
2111
2111
2112
+ if (token_stream.lookAhead () == Token_noexcept)
2113
+ {
2114
+ // ignore noexcept
2115
+ token_stream.nextToken ();
2116
+ return true ;
2117
+ }
2118
+
2112
2119
CHECK (Token_throw);
2113
2120
ADVANCE (' (' , " (" );
2114
2121
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ static char const * const _S_token_names[] = {
103
103
" mutable" ,
104
104
" namespace" ,
105
105
" new" ,
106
+ " noexcept" ,
106
107
" not" ,
107
108
" not_eq" ,
108
109
" number_literal" ,
Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ enum TOKEN_KIND
105
105
Token_mutable ,
106
106
Token_namespace ,
107
107
Token_new ,
108
+ Token_noexcept ,
108
109
Token_not ,
109
110
Token_not_eq ,
110
111
Token_number_literal ,
You can’t perform that action at this time.
0 commit comments