1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00
guile/module/system
Matt Wette a12ca2b999 multiple languages support via file extension or #lang header
From scripts/compile pushed default assumption of #:from as 'scheme down
into system/base/compile where filename and first line can be used to
deduce intended "from" language.  If first line of a file is of the form
  #lang ecmascript
then the file is assumed consist of source language "ecmascript".

* module/scripts/compile.scm (compile): changed default #:from to #f
  from 'scheme

* module/system/base/compile.scm(lang-from-port, %file-extension-map,
  add-lang-extension, lang-extension-for): added global
  %file-extension-map with accessor lang-extension-for and updater
  add-lang-extension.  Also, added lang-from-port to parse  first line,
  looking for #lang.

* test-suite/tests.scm: added "load-lang" test.

* test-suite/Makefile.am(SCM_TESTS): added tests/load-lang.test
2023-02-23 21:41:55 +01:00
..
base multiple languages support via file extension or #lang header 2023-02-23 21:41:55 +01:00
repl Bump user-visible copyright years to 2023. 2023-01-13 16:15:07 +01:00
vm Avoid 'frame-local-ref' errors when printing backtrace. 2022-11-29 11:53:54 +01:00
foreign-library.scm foreign-library: fix darwin detection 2021-09-02 08:59:57 +02:00
foreign-object.scm Add #:static-slot-allocation? 2015-02-06 13:25:17 +01:00
foreign.scm Support C99 complex types conditionally in (system foreign) 2021-12-01 18:40:19 +01:00
syntax.scm Document syntax-sourcev 2021-03-09 20:50:08 +01:00
xref.scm Remove backend support for cached-module-box et al. 2018-05-14 14:04:59 +02:00