Change syntax of $if, $assert, $include, $echo. Introduces $error

This commit is contained in:
Christoffer Lerno
2023-05-06 12:18:00 +02:00
parent 3dd6675e1b
commit 172d561f07
104 changed files with 338 additions and 336 deletions

View File

@@ -177,7 +177,7 @@ macro bool os_is_posix()
**/
fn String! get_var(String name)
{
$if (COMPILER_LIBC_AVAILABLE && !os_is_win32())
$if COMPILER_LIBC_AVAILABLE && !os_is_win32():
@pool()
{
ZString val = libc::getenv(name.zstr_tcopy());
@@ -196,7 +196,7 @@ $endif
**/
fn void set_var(String name, String value, bool overwrite = true)
{
$if (COMPILER_LIBC_AVAILABLE && !os_is_win32())
$if COMPILER_LIBC_AVAILABLE && !os_is_win32():
@pool()
{
if (libc::setenv(name.zstr_tcopy(), value.zstr_copy(), (int)overwrite))
@@ -213,7 +213,7 @@ $endif
**/
fn void clear_var(String name)
{
$if (COMPILER_LIBC_AVAILABLE && !os_is_win32())
$if COMPILER_LIBC_AVAILABLE && !os_is_win32():
@pool()
{
if (libc::unsetenv(name.zstr_tcopy()))