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; }
public void WriteExternScope(ExternScope s) { BeginLine(); WriteExternString(s.Source, s.String, s.Object, s.Arguments, s.Scopes); EndLine(); }