- Timestamp:
- Jan 17, 2025, 3:46:34 PM (9 months ago)
- Branches:
- master
- Children:
- df56e25
- Parents:
- 3b340d68
- Location:
- src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Stmt.hpp
r3b340d68 rd96f7c4 9 9 // Author : Aaron B. Moss 10 10 // Created On : Wed May 8 13:00:00 2019 11 // Last Modified By : Andrew Beach12 // Last Modified On : Wed Apr 5 10:34:00 202313 // Update Count : 3 711 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jan 17 14:18:56 2025 13 // Update Count : 38 14 14 // 15 15 … … 280 280 }; 281 281 282 // Branch control flow statement: goto ... or break or continue or fallthr u282 // Branch control flow statement: goto ... or break or continue or fallthrough 283 283 class BranchStmt final : public Stmt { 284 284 public: -
src/CodeGen/CodeGenerator.cpp
r3b340d68 rd96f7c4 9 9 // Author : Andrew Beach 10 10 // Created On : Tue Oct 17 15:54:00 2023 11 // Last Modified By : Andrew Beach12 // Last Modified On : Wed Oct 25 18:28:00 202313 // Update Count : 011 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jan 17 14:19:22 2025 13 // Update Count : 1 14 14 // 15 15 … … 1092 1092 case ast::BranchStmt::FallThrough: 1093 1093 case ast::BranchStmt::FallThroughDefault: 1094 assertf( !options.genC, "fallthr ushould not reach code generation." );1095 output << "fallthr u";1094 assertf( !options.genC, "fallthrough should not reach code generation." ); 1095 output << "fallthrough"; 1096 1096 break; 1097 1097 default: 1098 1098 assertf( false, "Bad BranchStmt value." ); 1099 1099 } 1100 // Print branch target for labelled break/continue/fallthr uin debug mode.1100 // Print branch target for labelled break/continue/fallthrough in debug mode. 1101 1101 if ( !options.genC && stmt->kind != ast::BranchStmt::Goto ) { 1102 1102 if ( !stmt->target.empty() ) { -
src/Parser/lex.ll
r3b340d68 rd96f7c4 10 10 * Created On : Sat Sep 22 08:58:10 2001 11 11 * Last Modified By : Peter A. Buhr 12 * Last Modified On : Sun Dec 15 17:23:46 202413 * Update Count : 87 712 * Last Modified On : Fri Jan 17 14:36:16 2025 13 * Update Count : 878 14 14 */ 15 15 … … 273 273 extern { KEYWORD_RETURN(EXTERN); } 274 274 fallthrough { KEYWORD_RETURN(FALLTHROUGH); } // CFA 275 fallthru { KEYWORD_RETURN(FALLTHRU); } // CFA276 275 finally { QKEYWORD_RETURN(FINALLY); } // CFA 277 276 fixup { QKEYWORD_RETURN(FIXUP); } // CFA -
src/Parser/parser.yy
r3b340d68 rd96f7c4 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Dec 15 21:30:38 202413 // Update Count : 693 312 // Last Modified On : Fri Jan 17 14:35:08 2025 13 // Update Count : 6935 14 14 // 15 15 … … 377 377 %token ATTRIBUTE EXTENSION // GCC 378 378 %token IF ELSE SWITCH CASE DEFAULT DO WHILE FOR BREAK CONTINUE GOTO RETURN 379 %token CHOOSE FALLTHR U FALLTHROUGH WITH WHEN WAITFOR WAITUNTIL// CFA379 %token CHOOSE FALLTHROUGH WITH WHEN WAITFOR WAITUNTIL // CFA 380 380 %token CORUN COFOR 381 381 %token DISABLE ENABLE TRY THROW THROWRESUME AT // CFA … … 1680 1680 // whereas normal operator precedence yields goto (*i)+3; 1681 1681 { $$ = new StatementNode( build_computedgoto( $3 ) ); } 1682 // A semantic check is required to ensure fallthr uappears only in the body of a choose statement.1683 | fall_through_name ';'// CFA1682 // A semantic check is required to ensure fallthrough appears only in the body of a choose statement. 1683 | FALLTHROUGH ';' // CFA 1684 1684 { $$ = new StatementNode( build_branch( yylloc, ast::BranchStmt::FallThrough ) ); } 1685 | fall_through_name identifier_or_type_name ';'// CFA1685 | FALLTHROUGH identifier_or_type_name ';' // CFA 1686 1686 { $$ = new StatementNode( build_branch( yylloc, $2, ast::BranchStmt::FallThrough ) ); } 1687 | fall_through_name DEFAULT ';'// CFA1687 | FALLTHROUGH DEFAULT ';' // CFA 1688 1688 { $$ = new StatementNode( build_branch( yylloc, ast::BranchStmt::FallThroughDefault ) ); } 1689 1689 | CONTINUE ';' … … 1723 1723 | THROWRESUME assignment_expression_opt AT assignment_expression ';' // handles reresume 1724 1724 { $$ = new StatementNode( build_resume_at( $2, $4 ) ); } 1725 ;1726 1727 fall_through_name: // CFA1728 FALLTHRU1729 | FALLTHROUGH1730 1725 ; 1731 1726
Note:
See TracChangeset
for help on using the changeset viewer.