Home | History | Annotate | Download | only in kati

Lines Matching defs:stmt

27 #include "stmt.h"
39 IfStmt* stmt;
49 Parser(StringPiece buf, const char* filename, vector<Stmt*>* stmts)
59 Parser(StringPiece buf, const Loc& loc, vector<Stmt*>* stmts)
138 ParseErrorStmt* stmt = new ParseErrorStmt();
139 stmt->set_loc(loc_);
140 stmt->msg = msg;
141 out_stmts_->push_back(stmt);
142 parse_errors.push_back(stmt);
165 CommandStmt* stmt = new CommandStmt();
166 stmt->set_loc(loc_);
167 stmt->expr = ParseExpr(line.substr(1), ParseExprOpt::COMMAND);
168 stmt->orig = line;
169 out_stmts_->push_back(stmt);
220 RuleStmt* stmt = new RuleStmt();
221 stmt->set_loc(loc_);
226 stmt->term = line[found];
228 stmt->term == ';' ? ParseExprOpt::COMMAND : ParseExprOpt::NORMAL;
229 stmt->after_term = ParseExpr(TrimLeftSpace(line.substr(found + 1)), opt);
230 stmt->expr = ParseExpr(TrimSpace(line.substr(0, found)));
232 stmt->term = 0;
233 stmt->after_term = NULL;
234 stmt->expr = ParseExpr(line);
236 out_stmts_->push_back(stmt);
250 AssignStmt* stmt = new AssignStmt();
251 stmt->set_loc(loc_);
252 stmt->lhs = ParseExpr(lhs);
253 stmt->rhs = ParseExpr(rhs);
254 stmt->orig_rhs = rhs;
255 stmt->op = op;
256 stmt->directive = current_directive_;
257 out_stmts_->push_back(stmt);
262 IncludeStmt* stmt = new IncludeStmt();
263 stmt->set_loc(loc_);
264 stmt->expr = ParseExpr(line);
265 stmt->should_exist = directive[0] == 'i';
266 out_stmts_->push_back(stmt);
295 AssignStmt* stmt = new AssignStmt();
296 stmt->set_loc(Loc(loc_.filename, define_start_line_));
297 stmt->lhs = ParseExpr(define_name_);
301 stmt->rhs = ParseExpr(rhs, ParseExprOpt::DEFINE);
302 stmt->orig_rhs = rhs;
303 stmt->op = AssignOp::EQ;
304 stmt->directive = current_directive_;
305 out_stmts_->push_back(stmt);
309 void EnterIf(IfStmt* stmt) {
311 st->stmt = stmt;
315 out_stmts_ = &stmt->true_stmts;
319 IfStmt* stmt = new IfStmt();
320 stmt->set_loc(loc_);
321 stmt->op = directive[2] == 'n' ? CondOp::IFNDEF : CondOp::IFDEF;
322 stmt->lhs = ParseExpr(line);
323 stmt->rhs = NULL;
324 out_stmts_->push_back(stmt);
325 EnterIf(stmt);
328 bool ParseIfEqCond(StringPiece s, IfStmt* stmt) {
337 stmt->lhs = ParseExprImpl(loc_, s, terms, ParseExprOpt::NORMAL, &n, true);
341 stmt->rhs = ParseExprImpl(loc_, s, NULL, ParseExprOpt::NORMAL, &n);
355 stmt->lhs = v;
357 stmt->rhs = v;
369 IfStmt* stmt = new IfStmt();
370 stmt->set_loc(loc_);
371 stmt->op = directive[2] == 'n' ? CondOp::IFNEQ : CondOp::IFEQ;
373 if (!ParseIfEqCond(line, stmt)) {
378 out_stmts_->push_back(stmt);
379 EnterIf(stmt);
391 out_stmts_ = &st->stmt->false_stmts;
420 out_stmts_ = &st->stmt->false_stmts;
422 out_stmts_ = &st->stmt->true_stmts;
433 ExportStmt* stmt = new ExportStmt;
434 stmt->set_loc(loc_);
435 stmt->expr = ParseExpr(line);
436 stmt->is_export = is_export;
437 out_stmts_->push_back(stmt);
507 vector<Stmt*>* stmts_;
508 vector<Stmt*>* out_stmts_;
538 void Parse(StringPiece buf, const Loc& loc, vector<Stmt*>* out_stmts) {
545 vector<Stmt*>* out_stmts) {