Beispiel #1
0
 protected MacroScope(Scope parent, Ast.Block block,
                      IEnumerable <KeyValuePair <ParameterExpression, Ast.MacroParam> > macroParams)
     : base(parent, block)
 {
     MacroParams = new Dictionary <ParameterExpression, Ast.MacroParam> ();
     foreach (var kv in macroParams)
     {
         MacroParams.Add(kv.Key, kv.Value);
     }
 }
Beispiel #2
0
 protected void BeginScope(Ast.Block block)
 {
     _currentScope = Scope.Begin(_currentScope, block);
 }
Beispiel #3
0
 protected Scope(Scope parent, Ast.Block block)
 {
     Parent    = parent;
     Block     = block;
     LocalVars = new Dictionary <string, Ast.Variable> ();
 }
Beispiel #4
0
 public static Scope Begin(Scope parent, Ast.Block block)
 {
     return(new Scope(parent, block));
 }
Beispiel #5
0
 public static Scope Begin(Scope parent, Ast.Block block,
                           IEnumerable <KeyValuePair <ParameterExpression, Ast.MacroParam> > macroParams)
 {
     return(new MacroScope(parent, block, macroParams));
 }