Exemplo n.º 1
0
 private IDictionary<string, MacroStatement> GetTemplates(MacroStatement _bml) {
     if (!_bml.ContainsAnnotation("templates"))
     {
         _bml["templates"] = new Dictionary<string, MacroStatement>();
     }
     return _bml.get<IDictionary<string, MacroStatement>>("templates");
 }
Exemplo n.º 2
0
 private void TreatMacroAsMethodInvocation(MacroStatement node)
 {
     var invocation = new MethodInvocationExpression(node.LexicalInfo, new ReferenceExpression(node.LexicalInfo, node.Name))
                      	{ Arguments = node.Arguments };
     if (node.ContainsAnnotation("compound") || !IsNullOrEmpty(node.Body))
         invocation.Arguments.Add(new BlockExpression(node.Body));
     ReplaceCurrentNode(new ExpressionStatement(node.LexicalInfo, invocation, node.Modifier));
 }