clang API Documentation

EditsReceiver.h
Go to the documentation of this file.
00001 //===----- EditedSource.h - Collection of source edits ----------*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 
00010 #ifndef LLVM_CLANG_EDIT_EDITSRECEIVER_H
00011 #define LLVM_CLANG_EDIT_EDITSRECEIVER_H
00012 
00013 #include "clang/Basic/LLVM.h"
00014 
00015 namespace clang {
00016   class SourceLocation;
00017   class CharSourceRange;
00018 
00019 namespace edit {
00020 
00021 class EditsReceiver {
00022 public:
00023   virtual ~EditsReceiver() { }
00024 
00025   virtual void insert(SourceLocation loc, StringRef text) = 0;
00026   virtual void replace(CharSourceRange range, StringRef text) = 0;
00027   /// \brief By default it calls replace with an empty string.
00028   virtual void remove(CharSourceRange range);
00029 };
00030 
00031 }
00032 
00033 } // end namespace clang
00034 
00035 #endif