Ejemplo n.º 1
0
 public Function(Ast.Program program, Ast.Function function,
                 HashSet <Type> typesDefined)
 {
     Program      = program;
     AstFunction  = function;
     TypesDefined = typesDefined;
 }
Ejemplo n.º 2
0
 protected LinqParser(Type linqType, TypeMapping typeMapping)
 {
     _typesDefined = new HashSet <Type> ();
     _constants    = new Dictionary <string, Ast.Constant> ();
     _globalVars   = new Dictionary <string, Ast.Variable> ();
     _globals      = new Dictionary <string, Ast.Global> ();
     _linqType     = linqType;
     _typeMapping  = typeMapping;
     _program      = Ast.Prog();
 }
Ejemplo n.º 3
0
 private void AddExternalReferences(Ast.Program program, HashSet <Type> typesDefined)
 {
     if (typesDefined == null || program == null)
     {
         return;
     }
     _typesDefined.UnionWith(typesDefined);
     foreach (var glob in program.Globals)
     {
         if (!_globals.ContainsKey(glob.Name))
         {
             AddGlobal(glob);
         }
     }
     foreach (var func in program.Functions)
     {
         if (!_program.Functions.Contains(func))
         {
             _program.Functions.Add(func);
         }
     }
 }
Ejemplo n.º 4
0
 internal Macro(Ast.Macro macro, Ast.Program program, HashSet <Type> typesDefined)
 {
     AstMacro     = macro;
     Program      = program;
     TypesDefined = typesDefined;
 }