<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/main/parse.go
diff options
context:
space:
mode:
Diffstat (limited to 'main/parse.go')
-rw-r--r--main/parse.go17
1 files changed, 2 insertions, 15 deletions
diff --git a/main/parse.go b/main/parse.go
index 141ae7e..9c7a437 100644
--- a/main/parse.go
+++ b/main/parse.go
@@ -65,23 +65,14 @@ func (p *parser) parseBasicCommand(commands []Command, commandChar rune) []Comma
return append(commands, PrintValueCommand{})
case 'd':
return append(commands, DeleteValueCommand{})
- case 'D':
- return append(commands, DeletePathCommand{})
case 'n':
return append(commands, NextCommand{})
case 'N':
return append(commands, AppendNextCommand{})
- case 's', 'S':
+ case 's':
ast := p.parseSubex()
subex := subex.CompileTransducer(ast)
- switch commandChar {
- case 's':
- return append(commands, SubstituteValueCommand {subex}, JumpCommand {len(commands) + 3})
- case 'S':
- return append(commands, SubstitutePathCommand {subex}, JumpCommand {len(commands) + 3})
- default:
- panic("Unreachable!?!?")
- }
+ return append(commands, SubstituteValueCommand {subex}, JumpCommand {len(commands) + 3})
case 'o':
return append(commands, NoopCommand{})
case 'x':
@@ -96,10 +87,6 @@ func (p *parser) parseBasicCommand(commands []Command, commandChar rune) []Comma
return append(commands, SwapZRegCommand{})
case 'Z':
return append(commands, AppendZRegCommand{})
- case 'k':
- return append(commands, SwapPathCommand{})
- case 'K':
- return append(commands, AppendPathCommand{})
case ':':
labelToken := p.next()
if labelToken.typ != TokenLabel {