more fixed for v0.3.6

This commit is contained in:
Luxferre
2026-07-10 10:11:13 +03:00
parent 6c3a48d796
commit 94a809d224
3 changed files with 16 additions and 6 deletions
+10 -4
View File
@@ -268,7 +268,11 @@ func (c *Clyx) popCallerToken() any {
}
}
if stream == nil {
stream = &c.tokens
if len(c.tokenStreams) == 0 {
stream = &c.tokens
} else {
return nil
}
}
if len(*stream) == 0 { return nil }
t := (*stream)[0]
@@ -292,15 +296,17 @@ func (c *Clyx) cmdDefw() {
break
}
}
if stream == nil {
if stream == nil && len(c.tokenStreams) == 0 {
stream = &c.tokens
}
var val any
if len(*stream) > 0 {
if stream != nil && len(*stream) > 0 {
t0 := (*stream)[0]
isQForm := false
if s, ok := t0.(string); ok && s == "[" { isQForm = true } else if _, ok := t0.([]any); ok { isQForm = true }
if isQForm { val = c.popCallerToken() }
if isQForm {
val = c.popCallerToken()
}
}
if val == nil { val = c.pop() }
if s, ok := val.(string); ok {