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