Home | History | Annotate | Download | only in kati

Lines Matching refs:stmt

27 #include "stmt.h"
39 IfStmt* stmt;
49 Parser(StringPiece buf, const char* filename, vector<Stmt*>* stmts)
60 Parser(StringPiece buf, const Loc& loc, vector<Stmt*>* stmts)
147 ParseErrorStmt* stmt = new ParseErrorStmt();
148 stmt->set_loc(loc_);
149 stmt->msg = msg;
150 out_stmts_->push_back(stmt);
151 parse_errors.push_back(stmt);
174 CommandStmt* stmt = new CommandStmt();
175 stmt->set_loc(loc_);
176 stmt->expr = ParseExpr(line.substr(1), ParseExprOpt::COMMAND);
177 stmt->orig = line;
178 out_stmts_->push_back(stmt);
229 RuleStmt* stmt = new RuleStmt();
230 stmt->set_loc(loc_);
235 stmt->term = line[found];
237 stmt->term == ';' ? ParseExprOpt::COMMAND : ParseExprOpt::NORMAL;
238 stmt->after_term = ParseExpr(TrimLeftSpace(line.substr(found + 1)), opt);
239 stmt->expr = ParseExpr(TrimSpace(line.substr(0, found)));
241 stmt->term = 0;
242 stmt->after_term = NULL;
243 stmt->expr = ParseExpr(line);
245 out_stmts_->push_back(stmt);
259 AssignStmt* stmt = new AssignStmt();
260 stmt->set_loc(loc_);
261 stmt->lhs = ParseExpr(lhs);
262 stmt->rhs = ParseExpr(rhs);
263 stmt->orig_rhs = rhs;
264 stmt->op = op;
265 stmt->directive = current_directive_;
266 out_stmts_->push_back(stmt);
271 IncludeStmt* stmt = new IncludeStmt();
272 stmt->set_loc(loc_);
273 stmt->expr = ParseExpr(line);
274 stmt->should_exist = directive[0] == 'i';
275 out_stmts_->push_back(stmt);
310 AssignStmt* stmt = new AssignStmt();
311 stmt->set_loc(Loc(loc_.filename, define_start_line_));
312 stmt->lhs = ParseExpr(define_name_);
316 stmt->rhs = ParseExpr(rhs, ParseExprOpt::DEFINE);
317 stmt->orig_rhs = rhs;
318 stmt->op = AssignOp::EQ;
319 stmt->directive = current_directive_;
320 out_stmts_->push_back(stmt);
324 void EnterIf(IfStmt* stmt) {
326 st->stmt = stmt;
330 out_stmts_ = &stmt->true_stmts;
334 IfStmt* stmt = new IfStmt();
335 stmt->set_loc(loc_);
336 stmt->op = directive[2] == 'n' ? CondOp::IFNDEF : CondOp::IFDEF;
337 stmt->lhs = ParseExpr(line);
338 stmt->rhs = NULL;
339 out_stmts_->push_back(stmt);
340 EnterIf(stmt);
343 bool ParseIfEqCond(StringPiece s, IfStmt* stmt) {
352 stmt->lhs = ParseExprImpl(loc_, s, terms, ParseExprOpt::NORMAL, &n, true);
356 stmt->rhs = ParseExprImpl(loc_, s, NULL, ParseExprOpt::NORMAL, &n);
370 stmt->lhs = v;
372 stmt->rhs = v;
384 IfStmt* stmt = new IfStmt();
385 stmt->set_loc(loc_);
386 stmt->op = directive[2] == 'n' ? CondOp::IFNEQ : CondOp::IFEQ;
388 if (!ParseIfEqCond(line, stmt)) {
393 out_stmts_->push_back(stmt);
394 EnterIf(stmt);
406 out_stmts_ = &st->stmt->false_stmts;
435 out_stmts_ = &st->stmt->false_stmts;
437 out_stmts_ = &st->stmt->true_stmts;
448 ExportStmt* stmt = new ExportStmt;
449 stmt->set_loc(loc_);
450 stmt->expr = ParseExpr(line);
451 stmt->is_export = is_export;
452 out_stmts_->push_back(stmt);
522 vector<Stmt*>* stmts_;
523 vector<Stmt*>* out_stmts_;
554 void Parse(StringPiece buf, const Loc& loc, vector<Stmt*>* out_stmts) {
561 vector<Stmt*>* out_stmts) {