File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -728,7 +728,7 @@ auto lex_line(
728728 // G
729729 // G floating-point-literal:
730730 // G digit { ' | digit }* . digit { ' | digit }*
731- // GTODO TODO: full grammar
731+ // GTODO full grammar
732732 // G
733733 else if (is_digit (line[i])) {
734734 auto j = 1 ;
Original file line number Diff line number Diff line change @@ -1949,7 +1949,7 @@ class parser
19491949 // it doesn't destabilize any regression tests
19501950 )
19511951 {
1952- error (" expression-statement does not end with semicolon " );
1952+ error (" expected ; at end of statement " );
19531953 return {};
19541954 }
19551955 if (curr ().type () == lexeme::Semicolon) {
@@ -2267,6 +2267,14 @@ class parser
22672267 return {};
22682268 }
22692269
2270+ if (!is_expression) {
2271+ errors.emplace_back (
2272+ curr ().position (),
2273+ " (temporary alpha limitation) cppfront is still learning 'inspect' - only inspect expressions are currently supported"
2274+ );
2275+ return {};
2276+ }
2277+
22702278 auto n = std::make_unique<inspect_expression_node>();
22712279 n->identifier = &curr ();
22722280 next ();
You can’t perform that action at this time.
0 commit comments