diff options
author | Matt Wette <mwette@alumni.caltech.edu> | 2022-02-13 14:43:29 -0800 |
---|---|---|
committer | Arne Babenhauserheide <arne_bab@web.de> | 2023-02-23 21:41:55 +0100 |
commit | a12ca2b999fa746334c626603990475a08937cdc (patch) | |
tree | 28ab5f65d922d6c799dc2e7f332633d74a3cfff1 /lib/write.c | |
parent | ff165ec9040cce0aa7a9aac0ca44743b7c1186a3 (diff) | |
download | guile-a12ca2b999fa746334c626603990475a08937cdc.tar.gz |
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
Diffstat (limited to 'lib/write.c')
0 files changed, 0 insertions, 0 deletions