summaryrefslogtreecommitdiff
path: root/internal/generated/nqc.raku
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-02-27 09:52:36 +0200
committerPaul Buetow <paul@buetow.org>2024-02-27 09:52:36 +0200
commit2745f74f3db314a94ae181fb53963bf853db3833 (patch)
tree143cf8557089835906e3d899c8b18fcb00023cac /internal/generated/nqc.raku
parentd8441fff4bbf2739cc0e6c046035bf176158954a (diff)
use generated tracepoints.c
Diffstat (limited to 'internal/generated/nqc.raku')
-rw-r--r--internal/generated/nqc.raku16
1 files changed, 8 insertions, 8 deletions
diff --git a/internal/generated/nqc.raku b/internal/generated/nqc.raku
index e5ea4e1..e237b3f 100644
--- a/internal/generated/nqc.raku
+++ b/internal/generated/nqc.raku
@@ -44,7 +44,7 @@ class NQCToGoActions {
method constant($/) {
push @!const-names: ~$<identifier>;
- my $const-type = $<identifier>.ends-with('_OP_ID') ?? ' OpId' !! '';
+ my $const-type = $<identifier>.starts-with('SYS_') ?? ' SyscallId ' !! '';
make qq:to/END/;
const {$<identifier>}$const-type = {$<number>}
@@ -53,14 +53,14 @@ class NQCToGoActions {
method !constant-go-string-method returns Str {
qq:to/END/;
- type OpId uint32
+ type SyscallId uint32
- func (o OpId) String() string \{
- switch (o) \{
- {@!const-names.grep(/_OP_ID$/).map({
- "case $_: return \"{$_.subst('_OP_ID', '').lc}\""
+ func (s SyscallId) String() string \{
+ switch (s) \{
+ {@!const-names.grep(/^SYS_/).map({
+ "case $_: return \"{$_.subst('SYS_', '').lc}\""
}).join('; ')}
- default: panic(fmt.Sprintf("Unknown OpId: %d", o))
+ default: panic(fmt.Sprintf("Unknown SyscallId: %d", s))
\}
\}
END
@@ -120,7 +120,7 @@ class NQCToGoActions {
}
method member($/) {
- my Str $type = $<identifier>.made eq 'OpId' ?? 'OpId' !! $<type>.made;
+ my Str $type = $<identifier>.made eq 'SyscallId' ?? 'SyscallId' !! $<type>.made;
make $<identifier>.made ~ ' ' ~ ($<arraysize> // '') ~ $type;
}