1
0
Fork 0
forked from fun/fun

Added some missing license headers and some cosmetic changes.

This commit is contained in:
Johannes Findeisen 2025-09-27 10:12:44 +02:00
commit ff155b6a31
9 changed files with 56 additions and 4 deletions

View file

@ -1,3 +1,12 @@
/**
* This file is part of the Fun programming language.
* https://hanez.org/project/fun/
*
* Copyright 2025 Johannes Findeisen <you@hanez.org>
* Licensed under the terms of the ISC license.
* https://opensource.org/license/isc-license-txt
*/
case OP_LINE: {
/* operand holds the source line number */
vm->current_line = inst.operand;

View file

@ -1,3 +1,14 @@
/**
* This file is part of the Fun programming language.
* https://hanez.org/project/fun/
*
* Copyright 2025 Johannes Findeisen <you@hanez.org>
* Licensed under the terms of the ISC license.
* https://opensource.org/license/isc-license-txt
*/
// Get environment variables of the operation system.
case OP_ENV: {
Value key = pop_value(vm);
if (key.type != VAL_STRING) {

View file

@ -1,3 +1,12 @@
/**
* This file is part of the Fun programming language.
* https://hanez.org/project/fun/
*
* Copyright 2025 Johannes Findeisen <you@hanez.org>
* Licensed under the terms of the ISC license.
* https://opensource.org/license/isc-license-txt
*/
case OP_SCLAMP: {
/* Clamp/wrap to signed N-bit range: [-2^(N-1), 2^(N-1)-1] */
Value v = pop_value(vm);

View file

@ -1,3 +1,12 @@
/**
* This file is part of the Fun programming language.
* https://hanez.org/project/fun/
*
* Copyright 2025 Johannes Findeisen <you@hanez.org>
* Licensed under the terms of the ISC license.
* https://opensource.org/license/isc-license-txt
*/
case OP_TYPEOF: {
Value v = pop_value(vm);
const char *tname = "Unknown";

View file

@ -1,3 +1,12 @@
/**
* This file is part of the Fun programming language.
* https://hanez.org/project/fun/
*
* Copyright 2025 Johannes Findeisen <you@hanez.org>
* Licensed under the terms of the ISC license.
* https://opensource.org/license/isc-license-txt
*/
case OP_UCLAMP: {
/* Clamp/wrap the integer on top of the stack to 'bits' width (unsigned) */
Value v = pop_value(vm);