aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/state.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-05-19 18:15:04 +0900
committerOphestra <cat@gensokyo.uk>2026-05-19 18:15:04 +0900
commitff44060763eedf385d9218cc5a93344b8bb04021 (patch)
tree0f7d86fdcdc4513adb975be8ca423920e75a074f /internal/rosa/state.go
parent3010a209b52c3103a1f2dea5442aa1e7428855b4 (diff)
internal/rosa/package: migrate python packages
This also migrates LLVM LIT via the newly implemented special case. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/state.go')
-rw-r--r--internal/rosa/state.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/internal/rosa/state.go b/internal/rosa/state.go
index 2581bb75..90da8660 100644
--- a/internal/rosa/state.go
+++ b/internal/rosa/state.go
@@ -451,6 +451,30 @@ func (s *S) getFrame() azalea.Frame {
return
}},
+ k("split"): {F: func(
+ args azalea.FArgs,
+ ) (v any, set bool, err error) {
+ var p, sep string
+ var n int64
+ if err = args.Apply(map[unique.Handle[azalea.Ident]]any{
+ k("s"): &p,
+ k("sep"): &sep,
+ k("n"): &n,
+ }); err != nil {
+ return
+ }
+
+ if n < 0 {
+ n = 0
+ } else if n == 0 {
+ n = -1
+ }
+
+ v = strings.SplitN(p, sep, int(n))
+ set = true
+ return
+ }},
+
// intenral/pkg built-ins
k("remoteTar"): {F: func(