Lines Matching defs:brace
89 * semicolon, and a brace in certain cases.
105 // to check for a "dangling" else, where there was no brace-delimited block
118 // If we need a brace and don't have one, then we don't have a
133 // Since we have a brace, we need to just check if a brace was needed.
948 * @param brace True if the body was ended by a brace, false otherwise.
951 bc_parse_endBody(BcParse* p, bool brace)
958 if (brace)
960 // The brace was already gotten; make sure that the caller did not lie.
973 // Do we have a brace flag?
981 // If we have a brace flag but not a brace, that's a problem.
982 if (has_brace && !brace) bc_parse_err(p, BC_ERR_PARSE_TOKEN);
1012 // If we have a brace flag and not an if statement, we can pop the top
1037 else if (!has_brace && (!BC_PARSE_IF_END(p) || brace))
1047 if (brace && has_brace) brace = false;
1052 // statement and we have eaten the brace, we should stop. If we do have
1053 // a brace flag, we should stop.
1054 while (p->flags.len > 1 && !new_else && (!BC_PARSE_IF_END(p) || brace) &&
1057 // If we have a brace, yet no body for it, that's a problem.
1058 if (BC_ERR(p->flags.len == 1 && brace)) bc_parse_err(p, BC_ERR_PARSE_TOKEN);
1059 else if (brace && BC_PARSE_BRACE(p))
1061 // If we make it here, we have a brace and a flag for it.
1101 // not have a right brace when it should have.
1486 // POSIX requires that a brace be on the same line as the function header.
1487 // If we don't have a brace, let POSIX throw an error.
1557 * @param brace True if a brace was encountered, false otherwise.
1560 bc_parse_body(BcParse* p, bool brace)
1575 // We *must* have a brace in this case.
1576 if (BC_ERR(!brace)) bc_parse_err(p, BC_ERR_PARSE_TOKEN);
1603 // brace, and no body flag, and the flags len hasn't shrunk, then we
1606 if (!brace && !BC_PARSE_BODY(p) && len <= p->flags.len)
1659 // With a left brace, we are parsing a body.
1668 // If we *are* expecting a body, that body should get a brace. This