From 7084f5e1ceb61eab199512410048ad53e3ea08d7 Mon Sep 17 00:00:00 2001 From: Charlie Stanton Date: Tue, 23 Apr 2024 20:25:49 +0100 Subject: Add full merge command --- main/parse.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'main/parse.go') diff --git a/main/parse.go b/main/parse.go index 36917ac..36bd3ee 100644 --- a/main/parse.go +++ b/main/parse.go @@ -77,6 +77,10 @@ func (p *parser) parseBasicCommand(commands []Command, commandChar rune) []Comma return append(commands, SubstituteAppendNextCommand {subex}, JumpCommand {len(commands) + 3}) case 'm': return append(commands, MergeCommand{}) + case 'M': + ast := p.parseSubex() + subex := subex.CompileTransducer(ast) + return append(commands, FullMergeCommand {subex}, JumpCommand {len(commands) + 3}) case 's': ast := p.parseSubex() subex := subex.CompileTransducer(ast) -- cgit v1.2.3