mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-23 00:47:56 +01:00
Add a slice.length method.
This commit is contained in:
1 parent
fda696bf95
commit
51f2b183a2
7 files changed
+57
-6
No files matched your search
@@ -270,6 +270,7 @@ const (
|
||||
KeyIsOK = Key(IDIsOK >> KeyShift)
|
||||
KeyIsSuspension = Key(IDIsSuspension >> KeyShift)
|
||||
KeySlice = Key(IDSlice >> KeyShift)
|
||||
KeyLength = Key(IDLength >> KeyShift)
|
||||
|
||||
KeyXUnaryPlus = Key(IDXUnaryPlus >> KeyShift)
|
||||
KeyXUnaryMinus = Key(IDXUnaryMinus >> KeyShift)
|
||||
@@ -444,6 +445,7 @@ const (
|
||||
IDIsOK = ID(0xC6<<KeyShift | FlagsIdent | FlagsImplicitSemicolon)
|
||||
IDIsSuspension = ID(0xC7<<KeyShift | FlagsIdent | FlagsImplicitSemicolon)
|
||||
IDSlice = ID(0xC8<<KeyShift | FlagsIdent | FlagsImplicitSemicolon)
|
||||
IDLength = ID(0xC9<<KeyShift | FlagsIdent | FlagsImplicitSemicolon)
|
||||
)
|
||||
|
||||
// The IDXFoo IDs are not returned by the tokenizer. They are used by the
|
||||
@@ -640,6 +642,7 @@ var builtInsByKey = [nBuiltInKeys]struct {
|
||||
KeyIsOK: {"is_ok", IDIsOK},
|
||||
KeyIsSuspension: {"is_suspension", IDIsSuspension},
|
||||
KeySlice: {"slice", IDSlice},
|
||||
KeyLength: {"length", IDLength},
|
||||
}
|
||||
|
||||
var builtInsByName = map[string]ID{}
|
||||
|
||||
Reference in new issue
Block a user