Implemented eat function in sourcebuffer.