const DefaultProgramName …
const ProgramInitSize …
const MinTokenIndex …
type RewriteOperation …
type BaseRewriteOperation …
func (op *BaseRewriteOperation) GetInstructionIndex() int { … }
func (op *BaseRewriteOperation) GetIndex() int { … }
func (op *BaseRewriteOperation) GetText() string { … }
func (op *BaseRewriteOperation) GetOpName() string { … }
func (op *BaseRewriteOperation) GetTokens() TokenStream { … }
func (op *BaseRewriteOperation) SetInstructionIndex(val int) { … }
func (op *BaseRewriteOperation) SetIndex(val int) { … }
func (op *BaseRewriteOperation) SetText(val string) { … }
func (op *BaseRewriteOperation) SetOpName(val string) { … }
func (op *BaseRewriteOperation) SetTokens(val TokenStream) { … }
func (op *BaseRewriteOperation) Execute(_ *bytes.Buffer) int { … }
func (op *BaseRewriteOperation) String() string { … }
type InsertBeforeOp …
func NewInsertBeforeOp(index int, text string, stream TokenStream) *InsertBeforeOp { … }
func (op *InsertBeforeOp) Execute(buffer *bytes.Buffer) int { … }
func (op *InsertBeforeOp) String() string { … }
type InsertAfterOp …
func NewInsertAfterOp(index int, text string, stream TokenStream) *InsertAfterOp { … }
func (op *InsertAfterOp) Execute(buffer *bytes.Buffer) int { … }
func (op *InsertAfterOp) String() string { … }
type ReplaceOp …
func NewReplaceOp(from, to int, text string, stream TokenStream) *ReplaceOp { … }
func (op *ReplaceOp) Execute(buffer *bytes.Buffer) int { … }
func (op *ReplaceOp) String() string { … }
type TokenStreamRewriter …
func NewTokenStreamRewriter(tokens TokenStream) *TokenStreamRewriter { … }
func (tsr *TokenStreamRewriter) GetTokenStream() TokenStream { … }
func (tsr *TokenStreamRewriter) Rollback(programName string, instructionIndex int) { … }
func (tsr *TokenStreamRewriter) RollbackDefault(instructionIndex int) { … }
func (tsr *TokenStreamRewriter) DeleteProgram(programName string) { … }
func (tsr *TokenStreamRewriter) DeleteProgramDefault() { … }
func (tsr *TokenStreamRewriter) InsertAfter(programName string, index int, text string) { … }
func (tsr *TokenStreamRewriter) InsertAfterDefault(index int, text string) { … }
func (tsr *TokenStreamRewriter) InsertAfterToken(programName string, token Token, text string) { … }
func (tsr *TokenStreamRewriter) InsertBefore(programName string, index int, text string) { … }
func (tsr *TokenStreamRewriter) InsertBeforeDefault(index int, text string) { … }
func (tsr *TokenStreamRewriter) InsertBeforeToken(programName string, token Token, text string) { … }
func (tsr *TokenStreamRewriter) Replace(programName string, from, to int, text string) { … }
func (tsr *TokenStreamRewriter) ReplaceDefault(from, to int, text string) { … }
func (tsr *TokenStreamRewriter) ReplaceDefaultPos(index int, text string) { … }
func (tsr *TokenStreamRewriter) ReplaceToken(programName string, from, to Token, text string) { … }
func (tsr *TokenStreamRewriter) ReplaceTokenDefault(from, to Token, text string) { … }
func (tsr *TokenStreamRewriter) ReplaceTokenDefaultPos(index Token, text string) { … }
func (tsr *TokenStreamRewriter) Delete(programName string, from, to int) { … }
func (tsr *TokenStreamRewriter) DeleteDefault(from, to int) { … }
func (tsr *TokenStreamRewriter) DeleteDefaultPos(index int) { … }
func (tsr *TokenStreamRewriter) DeleteToken(programName string, from, to Token) { … }
func (tsr *TokenStreamRewriter) DeleteTokenDefault(from, to Token) { … }
func (tsr *TokenStreamRewriter) GetLastRewriteTokenIndex(programName string) int { … }
func (tsr *TokenStreamRewriter) GetLastRewriteTokenIndexDefault() int { … }
func (tsr *TokenStreamRewriter) SetLastRewriteTokenIndex(programName string, i int) { … }
func (tsr *TokenStreamRewriter) InitializeProgram(name string) []RewriteOperation { … }
func (tsr *TokenStreamRewriter) AddToProgram(name string, op RewriteOperation) { … }
func (tsr *TokenStreamRewriter) GetProgram(name string) []RewriteOperation { … }
func (tsr *TokenStreamRewriter) GetTextDefault() string { … }
func (tsr *TokenStreamRewriter) GetText(programName string, interval Interval) string { … }
func reduceToSingleOperationPerIndex(rewrites []RewriteOperation) map[int]RewriteOperation { … }
func max(a, b int) int { … }
func min(a, b int) int { … }