Changes in src/SynTree/Statement.h [ee3c93d:ba3706f]
- File:
-
- 1 edited
-
src/SynTree/Statement.h (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Statement.h
ree3c93d rba3706f 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Mar 8 14:53:02 201813 // Update Count : 7 812 // Last Modified On : Sun Sep 3 20:46:46 2017 13 // Update Count : 77 14 14 // 15 15 … … 126 126 }; 127 127 128 class DirectiveStmt : public Statement {129 public:130 std::string directive;131 132 DirectiveStmt( const std::string & );133 virtual ~DirectiveStmt(){}134 135 virtual DirectiveStmt * clone() const { return new DirectiveStmt( *this ); }136 virtual void accept( Visitor & v ) { v.visit( this ); }137 virtual Statement * acceptMutator( Mutator & m ) { return m.mutate( this ); }138 virtual void print( std::ostream & os, Indenter indent = {} ) const;139 };140 141 128 class IfStmt : public Statement { 142 129 public: … … 192 179 std::list<Statement *> stmts; 193 180 194 CaseStmt( Expression *conditions, const std::list<Statement *> &stmts, bool isdef = false ) throw (SemanticErrorException);181 CaseStmt( Expression *conditions, const std::list<Statement *> &stmts, bool isdef = false ) throw(SemanticError); 195 182 CaseStmt( const CaseStmt &other ); 196 183 virtual ~CaseStmt(); … … 220 207 Expression *condition; 221 208 Statement *body; 222 std::list<Statement *> initialization;223 209 bool isDoWhile; 224 210 225 211 WhileStmt( Expression *condition, 226 Statement *body, std::list<Statement *> & initialization,bool isDoWhile = false );212 Statement *body, bool isDoWhile = false ); 227 213 WhileStmt( const WhileStmt &other ); 228 214 virtual ~WhileStmt(); … … 269 255 class BranchStmt : public Statement { 270 256 public: 271 enum Type { Goto = 0, Break, Continue , FallThrough, FallThroughDefault};257 enum Type { Goto = 0, Break, Continue }; 272 258 273 259 // originalTarget kept for error messages. … … 277 263 Type type; 278 264 279 BranchStmt( Label target, Type ) throw (SemanticError Exception);280 BranchStmt( Expression *computedTarget, Type ) throw (SemanticError Exception);265 BranchStmt( Label target, Type ) throw (SemanticError); 266 BranchStmt( Expression *computedTarget, Type ) throw (SemanticError); 281 267 282 268 Label get_originalTarget() { return originalTarget; } … … 445 431 }; 446 432 447 class WithStmt : public Statement {448 public:449 std::list< Expression * > exprs;450 Statement * stmt;451 452 WithStmt( const std::list< Expression * > & exprs, Statement * stmt );453 WithStmt( const WithStmt & other );454 virtual ~WithStmt();455 456 virtual WithStmt * clone() const override { return new WithStmt( *this ); }457 virtual void accept( Visitor & v ) override { v.visit( this ); }458 virtual Statement * acceptMutator( Mutator & m ) override { return m.mutate( this ); }459 virtual void print( std::ostream & os, Indenter indent = {} ) const override;460 };461 462 433 463 434 // represents a declaration that occurs as part of a compound statement
Note:
See TracChangeset
for help on using the changeset viewer.