vector crash

zjh fqbqrr at 163.com
Thu Jan 18 04:31:52 UTC 2024


On Thursday, 18 January 2024 at 04:24:18 UTC, zjh wrote:

```d
class V : ASTVisitor
{
     Vector!string f=[];
     alias visit = ASTVisitor.visit;
     override void visit(const FunctionDeclaration decl)
     {
         writeln(' '.repeat(indentLevel * 4), decl.name.text);
         f.push_back(decl.name.text);
         indentLevel++;
         scope (exit) indentLevel--;
         decl.accept(this);
     }
     void out(string s){
         string b=s~".t";toF(f,b);
     }
}

```


More information about the Digitalmars-d-learn mailing list