Commit Graph

3 Commits

Author SHA1 Message Date
Jan Nieuwenhuizen 7e8341d76c core: One SCM type for function.
* mes.c (function_t): New struct.
  (type): One type for function.
  (call): Refactor.
* build-aux/mes-snarf.mes: Use arity annotation.  WAS: args.  Update
  annotations.
2016-12-12 20:33:50 +01:00
Jan Nieuwenhuizen 16f678a158 Implement strings and symbols as list of characters [WAS: c-string].
* mes.c (scm_t): Add string field.
  (make_string, internal_lookup_symbol, internal_make_symbol,
  make_symbol, lookup, readword): Take scm*.  Update callers.
  (display_helper): Support string field.
  (append_char): New function.
  (readstring): Use it.  Produce scm*.
  (cstring_to_list): New function.
  (add_environment, internal_make_symbol): Use it.
  (list_of_char_equal_p): New function.
  (internal_lookup_symbol): Use it.
* lib.c (list_ref): New function.
* string.c (string_ref): Use it.
  (string, string_append, string_length, substring, number_to_string,
  string_to_symbol, symbol_to_string): Update to list-of-characters
  implementation.
2016-12-12 20:33:48 +01:00
Jan Nieuwenhuizen e282117de9 Move strings to string.c.
* mes.c (string, string_append, list_to_string, string_length,
  string_ref, substring, number_to_string, string_to_symbol,
  symbol_to_string): Move to string.c
* string.c: New file.
* GNUmakefile (mes.o): Depend on string snarf output.
2016-10-22 20:18:03 +02:00