mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 00:52:18 +01:00
Add built-in slice functions
This commit is contained in:
1 parent
333b11dc65
commit
339673ae82
8 files changed
+120
-45
No files matched your search
@@ -126,3 +126,19 @@ var Funcs = []string{
|
||||
"writer1.mark()()",
|
||||
"writer1.since_mark()(ret[] u8)",
|
||||
}
|
||||
|
||||
const (
|
||||
GenericReplaceFrom = t.IDCapitalT
|
||||
GenericReplaceTo = t.IDDiamond
|
||||
)
|
||||
|
||||
var SliceFuncs = []string{
|
||||
// The "T" types here are generic placeholders for every "[] etc" slice
|
||||
// type. When parsing these strings (e.g. in the lang/check package), "T"
|
||||
// will be replaced by the "◊" diamond to denote a generic slice method, to
|
||||
// avoid any possible ambiguity with a user-defined, non-generic "T" type.
|
||||
"T.copy_from_slice(s T)(ret u64)",
|
||||
"T.length()(ret u64)",
|
||||
"T.prefix(up_to u64)(ret T)",
|
||||
"T.suffix(up_to u64)(ret T)",
|
||||
}
|
||||
Reference in new issue
Block a user