File tree Expand file tree Collapse file tree 5 files changed +17
-3
lines changed
regression-tests/test-results Expand file tree Collapse file tree 5 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 1
1
2
- cppfront compiler v0.2.1 Build 8912:1051
2
+ cppfront compiler v0.2.1 Build 8913:1037
3
3
Copyright(c) Herb Sutter All rights reserved
4
4
5
5
SPDX-License-Identifier: CC-BY-NC-ND-4.0
Original file line number Diff line number Diff line change 1
- "8912:1051 "
1
+ "8913:1037 "
Original file line number Diff line number Diff line change @@ -359,6 +359,7 @@ auto is_identifier_continue(char c)
359
359
}
360
360
361
361
// G identifier:
362
+ // G '__identifier__' keyword [Note: without whitespace before the keyword]
362
363
// G identifier-start
363
364
// G identifier identifier-continue
364
365
// G 'operator' operator
Original file line number Diff line number Diff line change @@ -306,6 +306,16 @@ class token
306
306
v.start (*this , depth);
307
307
}
308
308
309
+ auto remove_prefix_if (std::string_view prefix) {
310
+ if (
311
+ sv.size () > prefix.size ()
312
+ && sv.starts_with (prefix)
313
+ )
314
+ {
315
+ sv.remove_prefix (prefix.size ());
316
+ }
317
+ }
318
+
309
319
private:
310
320
std::string_view sv;
311
321
source_position pos;
@@ -1682,6 +1692,9 @@ auto lex_line(
1682
1692
else
1683
1693
{
1684
1694
store (j, lexeme::Identifier);
1695
+
1696
+ tokens.back ().remove_prefix_if (" __identifier__" );
1697
+
1685
1698
if (tokens.back () == " NULL" ) {
1686
1699
errors.emplace_back (
1687
1700
source_position (lineno, i),
Original file line number Diff line number Diff line change @@ -7106,7 +7106,7 @@ class parser
7106
7106
7107
7107
7108
7108
// G declaration:
7109
- // G access-specifier? identifier unnamed-declaration
7109
+ // G access-specifier? identifier '...'? unnamed-declaration
7110
7110
// G access-specifier? identifier alias
7111
7111
// G
7112
7112
// G access-specifier:
You can’t perform that action at this time.
0 commit comments