diff options
author | Charlie Stanton <charlie@shtanton.xyz> | 2024-04-23 20:25:49 +0100 |
---|---|---|
committer | Charlie Stanton <charlie@shtanton.xyz> | 2024-04-23 20:25:49 +0100 |
commit | 7084f5e1ceb61eab199512410048ad53e3ea08d7 (patch) | |
tree | 54db2851f4eb4b06998e00173d0bf30b9991d43f /main/parse.go | |
parent | 663dd2ede81e6415a3c16a46d8e9cfa2e209238f (diff) | |
download | stred-go-7084f5e1ceb61eab199512410048ad53e3ea08d7.tar |
Add full merge command
Diffstat (limited to 'main/parse.go')
-rw-r--r-- | main/parse.go | 4 |
1 files changed, 4 insertions, 0 deletions
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) |