use crate::buffer::TextBuffer;
mod comment;
mod composite;
mod edit;
mod lines;
pub use comment::ToggleCommentCommand;
pub(crate) use comment::line_comment_token;
pub use composite::{CompositeCommand, ReplaceTextCommand};
pub use edit::{
DeleteCharCommand, DeleteForwardCommand, DeleteRangeCommand,
InsertCharCommand, InsertNewlineCommand, InsertTextCommand,
};
pub use lines::{DuplicateLinesCommand, MoveLinesCommand};
pub trait Command: Send + std::fmt::Debug {
fn execute(&mut self, buffer: &mut TextBuffer, cursor: &mut (usize, usize));
fn undo(&mut self, buffer: &mut TextBuffer, cursor: &mut (usize, usize));
}