Added ssa tests
All checks were successful
/ test (push) Successful in 15s

This commit is contained in:
Eduard Urbach 2025-06-30 13:34:15 +02:00
parent 643f17af8e
commit a1f6c66736
Signed by: akyoto
GPG key ID: 49226B848C78F6C8
11 changed files with 221 additions and 33 deletions

View file

@ -2,6 +2,7 @@ package ssa
import (
"fmt"
"strings"
"git.urbach.dev/cli/q/src/types"
)
@ -27,7 +28,13 @@ func (v *Syscall) IsConst() bool {
}
func (v *Syscall) String() string {
return fmt.Sprintf("syscall(%v)", v.Arguments)
args := make([]string, 0, len(v.Arguments))
for _, arg := range v.Arguments {
args = append(args, arg.String())
}
return fmt.Sprintf("syscall(%s)", strings.Join(args, ", "))
}
func (v *Syscall) Type() types.Type {