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/base
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
..
types Minor tweak to truncate-bits 2021-05-10 10:07:12 +02:00
ck.scm Improve error for set-fields paths leading to different types. 2012-11-10 01:37:20 -05:00
compile.scm multiple languages support via file extension or #lang header 2023-02-23 21:41:55 +01:00
lalr.scm add source-location->source-properties to lalr 2010-11-18 12:31:28 +01:00
lalr.upstream.scm Update (system base lalr) from upstream. 2014-12-02 21:25:56 +01:00
language.scm Add compiler chooser implementation; fix bugs with previous commit 2020-05-08 22:56:37 +02:00
message.scm Properly display locations in "source vector" form. 2022-08-26 12:34:39 +02:00
optimize.scm Rework bootstrap to be reproducible 2022-02-01 14:50:40 +01:00
pmatch.scm pmatch: always wrap with let, even if the expression appears atomic 2012-03-01 16:16:27 -05:00
syntax.scm make-record-type does more validation on the fields 2019-10-23 14:42:29 +02:00
target.scm Recognize LoongArch compilation targets. 2022-12-21 08:49:08 +01:00
types.scm Deprecate symbol properties. 2022-02-04 11:12:28 +01:00