Revert to version 70b2c90b260171e829f1ebd7c17f600c11858dbe of the vendored package github.com/Azure/go-ansiterm

This commit is contained in:
Lucas Käldström
2016-12-11 22:10:39 +02:00
parent d8c925319a
commit 0033a02c43
26 changed files with 695 additions and 331 deletions

View File

@@ -1,34 +1,34 @@
package ansiterm
type escapeIntermediateState struct {
baseState
type EscapeIntermediateState struct {
BaseState
}
func (escState escapeIntermediateState) Handle(b byte) (s state, e error) {
logger.Infof("escapeIntermediateState::Handle %#x", b)
nextState, err := escState.baseState.Handle(b)
func (escState EscapeIntermediateState) Handle(b byte) (s State, e error) {
logger.Infof("EscapeIntermediateState::Handle %#x", b)
nextState, err := escState.BaseState.Handle(b)
if nextState != nil || err != nil {
return nextState, err
}
switch {
case sliceContains(intermeds, b):
case sliceContains(Intermeds, b):
return escState, escState.parser.collectInter()
case sliceContains(executors, b):
case sliceContains(Executors, b):
return escState, escState.parser.execute()
case sliceContains(escapeIntermediateToGroundBytes, b):
return escState.parser.ground, nil
case sliceContains(EscapeIntermediateToGroundBytes, b):
return escState.parser.Ground, nil
}
return escState, nil
}
func (escState escapeIntermediateState) Transition(s state) error {
logger.Infof("escapeIntermediateState::Transition %s --> %s", escState.Name(), s.Name())
escState.baseState.Transition(s)
func (escState EscapeIntermediateState) Transition(s State) error {
logger.Infof("EscapeIntermediateState::Transition %s --> %s", escState.Name(), s.Name())
escState.BaseState.Transition(s)
switch s {
case escState.parser.ground:
case escState.parser.Ground:
return escState.parser.escDispatch()
}