Still doesn't compile, but I think excellent progress.

This commit is contained in:
Simon Brooke 2026-04-28 11:54:15 +01:00
parent dbeb99759a
commit aac4669a3d
34 changed files with 1128 additions and 673 deletions

29
src/c/payloads/symbol.c Normal file
View file

@ -0,0 +1,29 @@
/**
* symbol.c
*
* Post Scarcity Soctware Environment
*
* TODO: Edit purpose.
*
* Copyright (c): 27 Apr 2026 Simon Brooke <simon@journeyman.cc>
* Licensed under GPL version 2.0, or, at your option, any later version.
*/
#include <wctype.h>
#include "memory/pointer.h"
#include "memory/tags.h"
#include "ops/string_ops.h"
/**
* Construct a symbol from the character `c` and this `tail`. A string is
* implemented as a flat list of cells each of which has one character and a
* pointer to the next; in the last cell the pointer to next is NIL.
*
* @param c the character to add (prepend);
* @param tail the symbol which is being built.
*/
struct pso_pointer make_symbol( struct pso_pointer frame_pointer, wint_t c,
struct pso_pointer tail ) {
return make_string_like_thing( frame_pointer, c, tail, SYMBOLTAG );
}