void doFields(DArray<T> fields) { for(auto &f: fields) { if(f.docs.length == 0) continue; if(auto method = f.func) { visit(method); if(c.docDecorators()) f.initializer = makeDocCall(f.initializer); } else { // TODO: this location might not be on exactly the same line as the field itself.. huge deal? DocTableDesc desc; pushDocTable(desc, f.initializer->location, f.docsLoc, ATODA("field"), f.name, f.docs); if(f.initializer->sourceStr.length) { pushTrimmedString(f.initializer->sourceStr); croc_fielda(t, mDocTable, "value"); } popDocTable(desc); } } }
void AstForest::acceptVisitor(AstVisitor &visitor) { visitor.visit(*this); }
// ************************************************** // AstObject methods // ************************************************** void AstObject::acceptVisitor(AstVisitor &v) { v.visit(*this); }
void AstSymbol::acceptVisitor(AstVisitor &visitor) { visitor.visit(*this); }
void AstCharLit::acceptVisitor(AstVisitor &visitor) { visitor.visit(*this); }
void AstStringLit::acceptVisitor(AstVisitor &visitor) { visitor.visit(*this); }
void AstLambda::acceptVisitor(AstVisitor &visitor) { visitor.visit(*this); }
void AstFloatLit::acceptVisitor(AstVisitor &visitor) { visitor.visit(*this); }
void AstFreeVariable::acceptVisitor(AstVisitor &visitor) { visitor.visit(*this); }
void AstBoundVariable::acceptVisitor(AstVisitor &visitor) { visitor.visit(*this); }
void AstCombination::acceptVisitor(AstVisitor &visitor) { visitor.visit(*this); }
inline virtual void accept(AstVisitor& visitor) { visitor.visit(*this); }