1
0
Fork 0
forked from fun/fun

Added tons of AI generated docs and a lot of cleanups. No code changes. (0.41.5)

This commit is contained in:
Johannes Findeisen 2026-05-01 02:20:25 +02:00
commit 4e69a3ce63
151 changed files with 3897 additions and 427 deletions

View file

@ -1,14 +1,27 @@
/*
/**
* This file is part of the Fun programming language.
* https://fun-lang.xyz/
*
* Copyright 2025 Johannes Findeisen <you@hanez.org>
* Licensed under the terms of the Apache-2.0 license.
* https://opensource.org/license/apache-2-0
*
* Added: 2025-12-10 (split from getters.c)
*/
/**
* @file get_int.c
* @brief VM opcode snippet for reading an integer from INI (OP_INI_GET_INT).
*
* Opcode: OP_INI_GET_INT
* Stack: [default:int] [key:string] [section:string] [handle:int] -> [out:int]
*
* Behavior
* - Pops default, key, section, and handle; looks up "section:key" (and dotted
* fallback) and attempts to parse as base-10 integer using strtol().
* - If lookup or parsing fails, returns the provided default.
*
* Errors
* - Invalid handle/args produce the default; no VM exception is raised.
*/
/* OP_INI_GET_INT */
#ifdef FUN_WITH_INI
case OP_INI_GET_INT: {