Fun
0.41.5
The programming language that makes you have fun!
Main Page
Data Structures
Files
File List
Globals
Loading...
Searching...
No Matches
src
vm
os
fun_version.c
Go to the documentation of this file.
1
/*
2
* This file is part of the Fun programming language.
3
* https://fun-lang.xyz/
4
*
5
* Copyright 2025 Johannes Findeisen <you@hanez.org>
6
* Licensed under the terms of the Apache-2.0 license.
7
* https://opensource.org/license/apache-2-0
8
*/
9
10
/**
11
* @file fun_version.c
12
* @brief VM opcode snippet: push the current Fun version string (OP_FUN_VERSION).
13
*
14
* Included into vm.c dispatch. Pushes a string constant with the build's
15
* FUN_VERSION onto the VM stack.
16
*/
17
18
// Pushes the current Fun version string onto the stack.
19
20
case
OP_FUN_VERSION
: {
21
#ifndef FUN_VERSION
22
#define FUN_VERSION "0.0.0-dev"
23
#endif
24
push_value
(vm,
make_string
(
FUN_VERSION
));
25
break
;
26
}
OP_FUN_VERSION
@ OP_FUN_VERSION
Definition
bytecode.h:148
FUN_VERSION
#define FUN_VERSION
Definition
fun.c:32
make_string
case make_string(FUN_VERSION))
push_value
static void push_value(VM *vm, Value v)
Push a Value onto the VM operand stack.
Definition
vm.c:564
Generated on
for Fun by
1.16.1