Example #1
0
 public Function(Ast.Program program, Ast.Function function,
                 HashSet <Type> typesDefined)
 {
     Program      = program;
     AstFunction  = function;
     TypesDefined = typesDefined;
 }
Example #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();
 }
Example #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);
         }
     }
 }
Example #4
0
 internal Macro(Ast.Macro macro, Ast.Program program, HashSet <Type> typesDefined)
 {
     AstMacro     = macro;
     Program      = program;
     TypesDefined = typesDefined;
 }