language-readers receive environment as an arg
* module/language/assembly/spec.scm: * module/language/brainfuck/spec.scm: * module/language/bytecode/spec.scm: * module/language/ecmascript/spec.scm: * module/language/glil/spec.scm: * module/language/scheme/spec.scm: * module/language/tree-il/spec.scm: Language-readers now take two arguments: the port and the environment. This should allow for compile-environment-specific reader behavior. * module/system/base/compile.scm (read-and-compile): * module/system/repl/common.scm (repl-read): Pass the environment to the language-reader. * module/system/repl/repl.scm (meta-reader, prompting-meta-read): * module/system/repl/command.scm (define-meta-command): Use the second argument to repl-reader, so we avoid frobbing current-reader.
This commit is contained in:
parent
a58b7fbb7e
commit
4b2afc6258
11 changed files with 47 additions and 44 deletions
|
|
@ -235,7 +235,7 @@ function should only be called from stages in the compiler tower."
|
|||
(language-default-environment from))))
|
||||
(let lp ((exps '()) (env #f)
|
||||
(cenv (fluid-ref *compilation-environment*)))
|
||||
(let ((x ((language-reader (current-language)) port)))
|
||||
(let ((x ((language-reader (current-language)) port env)))
|
||||
(cond
|
||||
((eof-object? x)
|
||||
(compile ((language-joiner joint) (reverse exps) env)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue