Implemented compilation to SSA form
All checks were successful
/ test (push) Successful in 31s

This commit is contained in:
Eduard Urbach 2025-06-23 00:17:05 +02:00
parent f7be86a3d9
commit 31c5ed614c
Signed by: akyoto
GPG key ID: 49226B848C78F6C8
27 changed files with 548 additions and 61 deletions

27
src/core/errors.go Normal file
View file

@ -0,0 +1,27 @@
package core
import (
"fmt"
"git.urbach.dev/cli/q/src/errors"
)
var (
InvalidExpression = errors.String("Invalid expression")
InvalidNumber = errors.String("Invalid number")
InvalidRune = errors.String("Invalid rune")
)
// UnknownIdentifier represents unknown identifiers.
type UnknownIdentifier struct {
Name string
CorrectName string
}
func (err *UnknownIdentifier) Error() string {
if err.CorrectName != "" {
return fmt.Sprintf("Unknown identifier '%s', did you mean '%s'?", err.Name, err.CorrectName)
}
return fmt.Sprintf("Unknown identifier '%s'", err.Name)
}