Hi! Is there any way to do checks like this:
####################################################################################################
# This is a test for c ffi and `when compiles` communications
#
# Too bad, but it's not working :-(
import macros
const badFfi = """
{.emit: "#include <header_not_found.h>".}
"""
const goodFfi = """
{.emit: "#include <stdio.h>".}
"""
when compiles badFfi.parseExpr:
echo "Bad ffi compiles"
else:
echo "Bad ffi not compiles"
when compiles goodFfi.parseExpr:
echo "Good ffi compiles"
else:
echo "Good ffi not compiles"
Unfortunatly, both variants compiles ok.