I am a bit stuck on global, file and local name spaces and scopes.

Normally my expression bindings is associated with a function, which
makes the function the scope of all the variables.

my front end can parse something like this:

int testfunc(int parmVar)
{
  int testfuncVar;
}

int testfunc2(int funcVar)
{
  int testfuncVar2;
}

Every function is individually gimplified and added and finalized.
Everything is chained and bind correctly.

parser->Fndecl = build_fn_decl(functionName, fnDeclType);
....
gimplify_function_tree(parser->Fndecl);
cgraph_node::finalize_function(parser->Fndecl, true);

I want to expand my front end to something like this:

module TestModule
{
  int moduleVariable;
  class TestClass
  {
    int classVariable;
    int testfunc(int parmVar)
    {
      int testfuncVar;
    }
  }
}

The question is what should TestModule be declared as, what tree type
or declaration function, and also TestClass. How should TestModule be
gimplified and then finalized.

Thank you
André

Reply via email to