Skip to content

Commit

Permalink
API for asking whether the compiler supports a certain nqp op
Browse files Browse the repository at this point in the history
This can be used to conditionally compile backend specific code in
modules like NativeCall
  • Loading branch information
niner committed Oct 5, 2021
1 parent cb1cddd commit 4dec8d5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core.c/Compiler.pm6
Expand Up @@ -85,6 +85,10 @@ class Compiler does Systemic {
}
}
}

method supports-op($opname) {
nqp::getcomp("Raku").supports-op($opname)
}
}

# vim: expandtab shiftwidth=4

0 comments on commit 4dec8d5

Please sign in to comment.