* @brief Returns true and advances if the current token matches kind t. */
| 366 | * @brief Returns true and advances if the current token matches kind t. |
| 367 | */ |
| 368 | bool Parser::accept(Tok t) |
| 369 | { |
| 370 | if (m_cur.type == t) { |
| 371 | advance(); |
| 372 | return true; |
| 373 | } |
| 374 | return false; |
| 375 | } |
| 376 | |
| 377 | /** |
| 378 | * @brief Consumes a required token kind or records a parse error and returns false. |
no outgoing calls
no test coverage detected