OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
aul::DefaultRecursiveVisitor Class Reference

#include <C4AulAST.h>

Inheritance diagram for aul::DefaultRecursiveVisitor:
[legend]
Collaboration diagram for aul::DefaultRecursiveVisitor:
[legend]

Public Member Functions

virtual ~DefaultRecursiveVisitor ()
 
virtual void visit (const ::aul::ast::ArrayLit *n) override
 
virtual void visit (const ::aul::ast::ProplistLit *n) override
 
virtual void visit (const ::aul::ast::UnOpExpr *n) override
 
virtual void visit (const ::aul::ast::BinOpExpr *n) override
 
virtual void visit (const ::aul::ast::AssignmentExpr *n) override
 
virtual void visit (const ::aul::ast::SubscriptExpr *n) override
 
virtual void visit (const ::aul::ast::SliceExpr *n) override
 
virtual void visit (const ::aul::ast::CallExpr *n) override
 
virtual void visit (const ::aul::ast::ParExpr *n) override
 
virtual void visit (const ::aul::ast::Block *n) override
 
virtual void visit (const ::aul::ast::Return *n) override
 
virtual void visit (const ::aul::ast::ForLoop *n) override
 
virtual void visit (const ::aul::ast::RangeLoop *n) override
 
virtual void visit (const ::aul::ast::DoLoop *n) override
 
virtual void visit (const ::aul::ast::WhileLoop *n) override
 
virtual void visit (const ::aul::ast::If *n) override
 
virtual void visit (const ::aul::ast::VarDecl *n) override
 
virtual void visit (const ::aul::ast::FunctionDecl *n) override
 
virtual void visit (const ::aul::ast::FunctionExpr *n) override
 
virtual void visit (const ::aul::ast::Script *n) override
 
virtual void visit (const ::aul::ast::Noop *)
 
virtual void visit (const ::aul::ast::StringLit *)
 
virtual void visit (const ::aul::ast::IntLit *)
 
virtual void visit (const ::aul::ast::BoolLit *)
 
virtual void visit (const ::aul::ast::NilLit *)
 
virtual void visit (const ::aul::ast::ThisLit *)
 
virtual void visit (const ::aul::ast::VarExpr *n)
 
virtual void visit (const ::aul::ast::Break *)
 
virtual void visit (const ::aul::ast::Continue *)
 
virtual void visit (const ::aul::ast::IncludePragma *)
 
virtual void visit (const ::aul::ast::AppendtoPragma *)
 
template<class T >
void visit (const T *)=delete
 

Detailed Description

Definition at line 439 of file C4AulAST.h.

Constructor & Destructor Documentation

virtual aul::DefaultRecursiveVisitor::~DefaultRecursiveVisitor ( )
inlinevirtual

Definition at line 442 of file C4AulAST.h.

442 {}

Member Function Documentation

virtual void aul::AstVisitor::visit ( const ::aul::ast::Noop )
inlinevirtualinherited

Reimplemented in C4AulCompiler::CodegenAstVisitor.

Definition at line 68 of file C4AulAST.h.

68 {}
virtual void aul::AstVisitor::visit ( const ::aul::ast::StringLit )
inlinevirtualinherited

Reimplemented in C4AulCompiler::ConstexprEvaluator, and C4AulCompiler::CodegenAstVisitor.

Definition at line 69 of file C4AulAST.h.

69 {}
virtual void aul::AstVisitor::visit ( const ::aul::ast::IntLit )
inlinevirtualinherited

Reimplemented in C4AulCompiler::ConstexprEvaluator, and C4AulCompiler::CodegenAstVisitor.

Definition at line 70 of file C4AulAST.h.

70 {}
virtual void aul::AstVisitor::visit ( const ::aul::ast::BoolLit )
inlinevirtualinherited

Reimplemented in C4AulCompiler::ConstexprEvaluator, and C4AulCompiler::CodegenAstVisitor.

Definition at line 71 of file C4AulAST.h.

71 {}
virtual void aul::AstVisitor::visit ( const ::aul::ast::NilLit )
inlinevirtualinherited

Reimplemented in C4AulCompiler::ConstexprEvaluator, and C4AulCompiler::CodegenAstVisitor.

Definition at line 74 of file C4AulAST.h.

74 {}
virtual void aul::AstVisitor::visit ( const ::aul::ast::ThisLit )
inlinevirtualinherited

Reimplemented in C4AulCompiler::ConstexprEvaluator, and C4AulCompiler::CodegenAstVisitor.

Definition at line 75 of file C4AulAST.h.

75 {}
virtual void aul::AstVisitor::visit ( const ::aul::ast::VarExpr n)
inlinevirtualinherited

Reimplemented in C4AulCompiler::ConstexprEvaluator, and C4AulCompiler::CodegenAstVisitor.

Definition at line 76 of file C4AulAST.h.

76 {}
virtual void aul::AstVisitor::visit ( const ::aul::ast::Break )
inlinevirtualinherited

Reimplemented in C4AulCompiler::CodegenAstVisitor.

Definition at line 90 of file C4AulAST.h.

90 {}
virtual void aul::AstVisitor::visit ( const ::aul::ast::Continue )
inlinevirtualinherited

Reimplemented in C4AulCompiler::CodegenAstVisitor.

Definition at line 91 of file C4AulAST.h.

91 {}
virtual void aul::AstVisitor::visit ( const ::aul::ast::IncludePragma )
inlinevirtualinherited

Reimplemented in C4AulCompiler::PreparseAstVisitor.

Definition at line 96 of file C4AulAST.h.

96 {}
virtual void aul::AstVisitor::visit ( const ::aul::ast::AppendtoPragma )
inlinevirtualinherited

Reimplemented in C4AulCompiler::PreparseAstVisitor.

Definition at line 97 of file C4AulAST.h.

97 {}
template<class T >
void aul::AstVisitor::visit ( const T *  )
deleteinherited
virtual void aul::DefaultRecursiveVisitor::visit ( const ::aul::ast::ArrayLit n)
inlineoverridevirtual

Reimplemented from aul::AstVisitor.

Reimplemented in C4AulCompiler::CodegenAstVisitor.

Definition at line 446 of file C4AulAST.h.

447  {
448  for (const auto &c : n->values)
449  c->accept(this);
450  }
std::vector< ExprPtr > values
Definition: C4AulAST.h:185
virtual void aul::DefaultRecursiveVisitor::visit ( const ::aul::ast::ProplistLit n)
inlineoverridevirtual

Reimplemented from aul::AstVisitor.

Reimplemented in C4AulCompiler::CodegenAstVisitor.

Definition at line 451 of file C4AulAST.h.

452  {
453  for (const auto &c : n->values)
454  c.second->accept(this);
455  }
std::vector< std::pair< std::string, ExprPtr > > values
Definition: C4AulAST.h:192
virtual void aul::DefaultRecursiveVisitor::visit ( const ::aul::ast::UnOpExpr n)
inlineoverridevirtual

Reimplemented from aul::AstVisitor.

Reimplemented in C4AulCompiler::CodegenAstVisitor.

Definition at line 456 of file C4AulAST.h.

457  {
458  n->operand->accept(this);
459  }
virtual void aul::DefaultRecursiveVisitor::visit ( const ::aul::ast::BinOpExpr n)
inlineoverridevirtual

Reimplemented from aul::AstVisitor.

Reimplemented in C4AulCompiler::CodegenAstVisitor.

Definition at line 460 of file C4AulAST.h.

461  {
462  n->lhs->accept(this);
463  n->rhs->accept(this);
464  }
virtual void aul::DefaultRecursiveVisitor::visit ( const ::aul::ast::AssignmentExpr n)
inlineoverridevirtual

Reimplemented from aul::AstVisitor.

Reimplemented in C4AulCompiler::CodegenAstVisitor.

Definition at line 465 of file C4AulAST.h.

466  {
467  n->lhs->accept(this);
468  n->rhs->accept(this);
469  }
virtual void aul::DefaultRecursiveVisitor::visit ( const ::aul::ast::SubscriptExpr n)
inlineoverridevirtual

Reimplemented from aul::AstVisitor.

Reimplemented in C4AulCompiler::CodegenAstVisitor.

Definition at line 470 of file C4AulAST.h.

471  {
472  n->object->accept(this);
473  n->index->accept(this);
474  }
virtual void aul::DefaultRecursiveVisitor::visit ( const ::aul::ast::SliceExpr n)
inlineoverridevirtual

Reimplemented from aul::AstVisitor.

Reimplemented in C4AulCompiler::CodegenAstVisitor.

Definition at line 475 of file C4AulAST.h.

476  {
477  n->object->accept(this);
478  n->start->accept(this);
479  n->end->accept(this);
480  }
virtual void aul::DefaultRecursiveVisitor::visit ( const ::aul::ast::CallExpr n)
inlineoverridevirtual

Reimplemented from aul::AstVisitor.

Reimplemented in C4AulCompiler::CodegenAstVisitor, and C4AulCompiler::PreparseAstVisitor.

Definition at line 481 of file C4AulAST.h.

References a.

482  {
483  if (n->context)
484  n->context->accept(this);
485  for (const auto &a : n->args)
486  a->accept(this);
487  }
#define a
std::vector< ExprPtr > args
Definition: C4AulAST.h:262
virtual void aul::DefaultRecursiveVisitor::visit ( const ::aul::ast::ParExpr n)
inlineoverridevirtual

Reimplemented from aul::AstVisitor.

Reimplemented in C4AulCompiler::CodegenAstVisitor, and C4AulCompiler::PreparseAstVisitor.

Definition at line 488 of file C4AulAST.h.

489  {
490  n->arg->accept(this);
491  }
virtual void aul::DefaultRecursiveVisitor::visit ( const ::aul::ast::Block n)
inlineoverridevirtual

Reimplemented from aul::AstVisitor.

Reimplemented in C4AulCompiler::CodegenAstVisitor.

Definition at line 492 of file C4AulAST.h.

References s.

493  {
494  for (const auto &s : n->children)
495  s->accept(this);
496  }
std::vector< StmtPtr > children
Definition: C4AulAST.h:278
#define s
virtual void aul::DefaultRecursiveVisitor::visit ( const ::aul::ast::Return n)
inlineoverridevirtual

Reimplemented from aul::AstVisitor.

Reimplemented in C4AulCompiler::CodegenAstVisitor.

Definition at line 497 of file C4AulAST.h.

498  {
499  n->value->accept(this);
500  }
ExprPtr value
Definition: C4AulAST.h:289
virtual void aul::DefaultRecursiveVisitor::visit ( const ::aul::ast::ForLoop n)
inlineoverridevirtual

Reimplemented from aul::AstVisitor.

Reimplemented in C4AulCompiler::CodegenAstVisitor.

Definition at line 501 of file C4AulAST.h.

502  {
503  if (n->init)
504  n->init->accept(this);
505  if (n->cond)
506  n->cond->accept(this);
507  if (n->incr)
508  n->incr->accept(this);
509  n->body->accept(this);
510  }
StmtPtr body
Definition: C4AulAST.h:296
ExprPtr cond
Definition: C4AulAST.h:295
virtual void aul::DefaultRecursiveVisitor::visit ( const ::aul::ast::RangeLoop n)
inlineoverridevirtual

Reimplemented from aul::AstVisitor.

Reimplemented in C4AulCompiler::CodegenAstVisitor, and C4AulCompiler::PreparseAstVisitor.

Definition at line 511 of file C4AulAST.h.

512  {
513  n->cond->accept(this);
514  n->body->accept(this);
515  }
StmtPtr body
Definition: C4AulAST.h:296
ExprPtr cond
Definition: C4AulAST.h:295
virtual void aul::DefaultRecursiveVisitor::visit ( const ::aul::ast::DoLoop n)
inlineoverridevirtual

Reimplemented from aul::AstVisitor.

Reimplemented in C4AulCompiler::CodegenAstVisitor.

Definition at line 516 of file C4AulAST.h.

517  {
518  n->body->accept(this);
519  n->cond->accept(this);
520  }
StmtPtr body
Definition: C4AulAST.h:296
ExprPtr cond
Definition: C4AulAST.h:295
virtual void aul::DefaultRecursiveVisitor::visit ( const ::aul::ast::WhileLoop n)
inlineoverridevirtual

Reimplemented from aul::AstVisitor.

Reimplemented in C4AulCompiler::CodegenAstVisitor.

Definition at line 521 of file C4AulAST.h.

522  {
523  n->cond->accept(this);
524  n->body->accept(this);
525  }
StmtPtr body
Definition: C4AulAST.h:296
ExprPtr cond
Definition: C4AulAST.h:295
virtual void aul::DefaultRecursiveVisitor::visit ( const ::aul::ast::If n)
inlineoverridevirtual

Reimplemented from aul::AstVisitor.

Reimplemented in C4AulCompiler::CodegenAstVisitor.

Definition at line 526 of file C4AulAST.h.

527  {
528  n->cond->accept(this);
529  n->iftrue->accept(this);
530  if (n->iffalse)
531  n->iffalse->accept(this);
532  }
ExprPtr cond
Definition: C4AulAST.h:343
StmtPtr iftrue
Definition: C4AulAST.h:344
StmtPtr iffalse
Definition: C4AulAST.h:344
virtual void aul::DefaultRecursiveVisitor::visit ( const ::aul::ast::VarDecl n)
inlineoverridevirtual

Reimplemented from aul::AstVisitor.

Reimplemented in C4AulCompiler::ConstantResolver, C4AulCompiler::CodegenAstVisitor, and C4AulCompiler::PreparseAstVisitor.

Definition at line 533 of file C4AulAST.h.

534  {
535  for (const auto &d : n->decls)
536  if (d.init)
537  d.init->accept(this);
538  }
std::vector< Var > decls
Definition: C4AulAST.h:370
virtual void aul::DefaultRecursiveVisitor::visit ( const ::aul::ast::FunctionDecl n)
inlineoverridevirtual

Reimplemented from aul::AstVisitor.

Reimplemented in C4AulCompiler::CodegenAstVisitor, and C4AulCompiler::PreparseAstVisitor.

Definition at line 539 of file C4AulAST.h.

540  {
541  n->body->accept(this);
542  }
std::unique_ptr< Block > body
Definition: C4AulAST.h:384
virtual void aul::DefaultRecursiveVisitor::visit ( const ::aul::ast::FunctionExpr n)
inlineoverridevirtual

Reimplemented from aul::AstVisitor.

Reimplemented in C4AulCompiler::CodegenAstVisitor.

Definition at line 543 of file C4AulAST.h.

544  {
545  n->body->accept(this);
546  }
std::unique_ptr< Block > body
Definition: C4AulAST.h:384
virtual void aul::DefaultRecursiveVisitor::visit ( const ::aul::ast::Script n)
inlineoverridevirtual

Reimplemented from aul::AstVisitor.

Reimplemented in C4AulCompiler::ConstantResolver, C4AulCompiler::CodegenAstVisitor, and C4AulCompiler::PreparseAstVisitor.

Definition at line 547 of file C4AulAST.h.

548  {
549  for (const auto &d : n->declarations)
550  d->accept(this);
551  }
std::vector< DeclPtr > declarations
Definition: C4AulAST.h:430

The documentation for this class was generated from the following file: