src/ast/statement/stmtlist.cc
// TODO: make getName() a virtual function on ASTNode,
// so we don't have to keep doing this...
make getName() a virtual function on ASTNode,
so we don't have to keep doing this
make getName () a virtual function on ASTNode so we don ' t have to keep doing this
static inline string ExtractName(ASTStatementNode* stmt) {
  if (FuncDeclNode* func = dynamic_cast<FuncDeclNode*>(stmt)) {
    return func->getName();
  } else if (ClassDeclNode* klass = dynamic_cast<ClassDeclNode*>(stmt)) {
    return klass->getName();
  }
  VENOM_NOT_REACHED;
}
static inline string ExtractName ( ASTStatementNode * stmt ) { if ( FuncDeclNode * func = dynamic_cast < FuncDeclNode * > ( stmt ) ) { return func -> getName ( ) ; } else if ( ClassDeclNode * klass = dynamic_cast < ClassDeclNode * > ( stmt ) ) { return klass -> getName ( ) ; } VENOM_NOT_REACHED ; }
TODO: make getName() a virtual function on ASTNode,
so we don't have to keep doing this...
TODO : make getName () a virtual function on ASTNode so we don ' t have to keep doing this ...