parse.c
static void ParseIf(ParseContext *c)
{
    ParseTreeNode *node = NewParseTreeNode(c, NodeTypeIfStatement);
    int tkn;
    node->u.ifStatement.test = ParseExpr(c);
    AddNodeToList(c, &c->bptr->pNextStatement, node);
    FRequire(c, T_THEN);
    PushBlock(c, BLOCK_IF, node);
    c->bptr->pNextStatement = &node->u.ifStatement.thenStatements;
    if ((tkn = GetToken(c)) != T_EOL) {
        ParseStatement(c, tkn);
        PopBlock(c);
    }
    Require(c, tkn, T_EOL);
}
/* ParseIf - parse the 'IF' statement */
parse the 'IF' statement
parse the ' IF ' statement
static void ParseIf(ParseContext *c)
{
    ParseTreeNode *node = NewParseTreeNode(c, NodeTypeIfStatement);
    int tkn;
    node->u.ifStatement.test = ParseExpr(c);
    AddNodeToList(c, &c->bptr->pNextStatement, node);
    FRequire(c, T_THEN);
    PushBlock(c, BLOCK_IF, node);
    c->bptr->pNextStatement = &node->u.ifStatement.thenStatements;
    if ((tkn = GetToken(c)) != T_EOL) {
        ParseStatement(c, tkn);
        PopBlock(c);
    }
    Require(c, tkn, T_EOL);
}
static void ParseIf ( ParseContext * c ) { ParseTreeNode * node = NewParseTreeNode ( c , NodeTypeIfStatement ) ; int tkn ; node -> u . ifStatement . test = ParseExpr ( c ) ; AddNodeToList ( c , & c -> bptr -> pNextStatement , node ) ; FRequire ( c , T_THEN ) ; PushBlock ( c , BLOCK_IF , node ) ; c -> bptr -> pNextStatement = & node -> u . ifStatement . thenStatements ; if ( ( tkn = GetToken ( c ) ) != T_EOL ) { ParseStatement ( c , tkn ) ; PopBlock ( c ) ; } Require ( c , tkn , T_EOL ) ; }
ParseIf - parse the 'IF' statement
ParseIf - parse the ' IF ' statement