Remove outdated comment in walk.

This commit is contained in:
gilch 2018-06-27 23:39:44 -06:00
parent 9a8886a452
commit 4b0e318997

View File

@ -313,63 +313,14 @@ as can nested let forms.
(macro-error k "bind targets must be symbols") (macro-error k "bind targets must be symbols")
(if (in '. k) (if (in '. k)
(macro-error k "binding target may not contain a dot"))) (macro-error k "binding target may not contain a dot")))
(.append values (symbolexpand (macroexpand-all v &name) expander)) (.append values (symbolexpand (macroexpand-all v &name)
expander))
(assoc replacements k `(get ~g!let ~(name k)))) (assoc replacements k `(get ~g!let ~(name k))))
`(do `(do
(setv ~g!let {} (setv ~g!let {}
~@(interleave (.values replacements) values)) ~@(interleave (.values replacements) values))
~@(symbolexpand (macroexpand-all body &name) expander))) ~@(symbolexpand (macroexpand-all body &name)
expander)))
;; (defmacro macrolet []) ;; (defmacro macrolet [])
#_[special cases for let
;; Symbols containing a dot should be converted to this form.
;; attrs should not get expanded,
;; but [] lookups should.
'.',
;;; can shadow let bindings with Python locals
;; protect its bindings for the lexical scope of its body.
'fn',
'fn*',
;; protect as bindings for the lexical scope of its body
'except',
;;; changes scope of named variables
;; protect the variables they name for the lexical scope of their container
'global',
'nonlocal',
;; should we provide a protect form?
;; it's an anaphor only valid in a `let` body.
;; this would make the named variables python-scoped in its body
;; expands to a do
'protect',
;;; quoted variables must not be expanded.
;; but unprotected, unquoted variables must be.
'quasiquote',
'quote',
'unquote',
'unquote-splice',
;;;; deferred
;; should really only exist at toplevel. Ignore until someone complains?
;; raise an error? treat like fn?
;; should probably be implemented as macros in terms of fn/setv anyway.
'defmacro',
'deftag',
;;; create Python-scoped variables. It's probably hard to avoid this.
;; Best just doc this behavior for now.
;; we can't avoid clobbering enclosing python scope, unless we use a gensym,
;; but that corrupts '__name__'.
;; It could be set later, but that could mess up metaclasses!
;; Should the class name update let variables too?
'defclass',
;; should this update let variables?
;; it could be done with gensym/setv.
'import',
;; I don't understand these. Ignore until someone complains?
'eval_and_compile', 'eval_when_compile', 'require',]