Ejemplo n.º 1
0
        public void ReplaceBody(Function f, string newCode)
        {
            var originalScope = GetForeignExternScopeFromFunction(f);

            var newScope = new ExternScope(
                originalScope.Source,
                AttributeList.Empty,
                newCode,
                CreateObject(originalScope.Source, f),
                originalScope.Arguments,
                originalScope.Scopes);

            f.Body.Statements[f.Body.Statements.Count - 1] = newScope;
        }
Ejemplo n.º 2
0
 public void WriteExternScope(ExternScope s)
 {
     BeginLine();
     WriteExternString(s.Source, s.String, s.Object, s.Arguments, s.Scopes);
     EndLine();
 }