forked from toolshed/abra
build: go 1.24
We were running behind and there were quite some deprecations to update. This was mostly in the upstream copy/pasta package but seems quite minimal.
This commit is contained in:
4
vendor/github.com/charmbracelet/x/ansi/parser/const.go
generated
vendored
4
vendor/github.com/charmbracelet/x/ansi/parser/const.go
generated
vendored
@ -8,7 +8,7 @@ const (
|
||||
NoneAction Action = iota
|
||||
ClearAction
|
||||
CollectAction
|
||||
MarkerAction
|
||||
PrefixAction
|
||||
DispatchAction
|
||||
ExecuteAction
|
||||
StartAction // Start of a data string
|
||||
@ -24,7 +24,7 @@ var ActionNames = []string{
|
||||
"NoneAction",
|
||||
"ClearAction",
|
||||
"CollectAction",
|
||||
"MarkerAction",
|
||||
"PrefixAction",
|
||||
"DispatchAction",
|
||||
"ExecuteAction",
|
||||
"StartAction",
|
||||
|
16
vendor/github.com/charmbracelet/x/ansi/parser/seq.go
generated
vendored
16
vendor/github.com/charmbracelet/x/ansi/parser/seq.go
generated
vendored
@ -4,9 +4,9 @@ import "math"
|
||||
|
||||
// Shift and masks for sequence parameters and intermediates.
|
||||
const (
|
||||
MarkerShift = 8
|
||||
PrefixShift = 8
|
||||
IntermedShift = 16
|
||||
CommandMask = 0xff
|
||||
FinalMask = 0xff
|
||||
HasMoreFlag = math.MinInt32
|
||||
ParamMask = ^HasMoreFlag
|
||||
MissingParam = ParamMask
|
||||
@ -22,12 +22,12 @@ const (
|
||||
DefaultParamValue = 0
|
||||
)
|
||||
|
||||
// Marker returns the marker byte of the sequence.
|
||||
// Prefix returns the prefix byte of the sequence.
|
||||
// This is always gonna be one of the following '<' '=' '>' '?' and in the
|
||||
// range of 0x3C-0x3F.
|
||||
// Zero is returned if the sequence does not have a marker.
|
||||
func Marker(cmd int) int {
|
||||
return (cmd >> MarkerShift) & CommandMask
|
||||
// Zero is returned if the sequence does not have a prefix.
|
||||
func Prefix(cmd int) int {
|
||||
return (cmd >> PrefixShift) & FinalMask
|
||||
}
|
||||
|
||||
// Intermediate returns the intermediate byte of the sequence.
|
||||
@ -36,12 +36,12 @@ func Marker(cmd int) int {
|
||||
// ',', '-', '.', '/'.
|
||||
// Zero is returned if the sequence does not have an intermediate byte.
|
||||
func Intermediate(cmd int) int {
|
||||
return (cmd >> IntermedShift) & CommandMask
|
||||
return (cmd >> IntermedShift) & FinalMask
|
||||
}
|
||||
|
||||
// Command returns the command byte of the CSI sequence.
|
||||
func Command(cmd int) int {
|
||||
return cmd & CommandMask
|
||||
return cmd & FinalMask
|
||||
}
|
||||
|
||||
// Param returns the parameter at the given index.
|
||||
|
4
vendor/github.com/charmbracelet/x/ansi/parser/transition_table.go
generated
vendored
4
vendor/github.com/charmbracelet/x/ansi/parser/transition_table.go
generated
vendored
@ -178,7 +178,7 @@ func GenerateTransitionTable() TransitionTable {
|
||||
table.AddRange(0x20, 0x2F, DcsEntryState, CollectAction, DcsIntermediateState)
|
||||
// Dcs_entry -> Dcs_param
|
||||
table.AddRange(0x30, 0x3B, DcsEntryState, ParamAction, DcsParamState)
|
||||
table.AddRange(0x3C, 0x3F, DcsEntryState, MarkerAction, DcsParamState)
|
||||
table.AddRange(0x3C, 0x3F, DcsEntryState, PrefixAction, DcsParamState)
|
||||
// Dcs_entry -> Dcs_passthrough
|
||||
table.AddRange(0x08, 0x0D, DcsEntryState, PutAction, DcsStringState) // Follows ECMA-48 § 8.3.27
|
||||
// XXX: allows passing ESC (not a ECMA-48 standard) this to allow for
|
||||
@ -254,7 +254,7 @@ func GenerateTransitionTable() TransitionTable {
|
||||
table.AddRange(0x20, 0x2F, CsiEntryState, CollectAction, CsiIntermediateState)
|
||||
// Csi_entry -> Csi_param
|
||||
table.AddRange(0x30, 0x3B, CsiEntryState, ParamAction, CsiParamState)
|
||||
table.AddRange(0x3C, 0x3F, CsiEntryState, MarkerAction, CsiParamState)
|
||||
table.AddRange(0x3C, 0x3F, CsiEntryState, PrefixAction, CsiParamState)
|
||||
|
||||
// Osc_string
|
||||
table.AddRange(0x00, 0x06, OscStringState, IgnoreAction, OscStringState)
|
||||
|
Reference in New Issue
Block a user