示例#1
0
    void VisitVariableDeclarator(VariableDeclaratorSyntax n)
    {
        WriteLine(n.Kind() + " " + n.GetType() + "  #" + GetUid(n));

        int uid = GetUid(n);

        csharpBuilder.name(n.Identifier.ToString());
        BuildType(type);
        csharpBuilder.varDecl(uid);

        // defer to later
        TraverseNode(n.Initializer, new ExprBuilder(this, type));
        csharpBuilder.initVarDecl(uid);
    }
示例#2
0
    void VisitVariableDeclarator(VariableDeclaratorSyntax n)
    {
        WriteLine(n.Kind() + " " + n.GetType() + "  #" + GetUid(n));

        int uid = GetUid(n);

        TypeSyntax ty = (n.Parent as VariableDeclarationSyntax).Type;

        csharpBuilder.name(n.Identifier.ToString());
        //~ BuildType(type_context());
        BuildType(ty);
        csharpBuilder.varDecl(uid);

        // defer to later
        if (n.Initializer != null)
        {
            deferred.Add(n);
        }
    }