Пример #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;
        }
Пример #2
0
 public void WriteExternScope(ExternScope s)
 {
     BeginLine();
     WriteExternString(s.Source, s.String, s.Object, s.Arguments, s.Scopes);
     EndLine();
 }