Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
parenscript
parenscript
Commits
116f9ca9
Commit
116f9ca9
authored
Mar 04, 2015
by
Jason Miller
Browse files
Preserve "this" in implicit lambdas
parent
101b09ed
Changes
3
Show whitespace changes
Inline
Side-by-side
src/compiler.lisp
View file @
116f9ca9
...
...
@@ -247,7 +247,7 @@ form, FORM, returns the new value for *compilation-level*."
(
expression-impl
(
apply
expression-impl
(
cdr
form
)))
((
member
op
*lambda-wrappable-statements*
)
(
compile-expression
`
((
lambda
()
,
form
))))
(
compile-expression
`
(
chain
(
lambda
()
,
form
)
(
call
this
)
)))
(
t
(
error
'compile-expression-error
:form
form
)))))
(
defun
ps-compile
(
form
)
...
...
src/lib/ps-loop.lisp
View file @
116f9ca9
...
...
@@ -403,5 +403,5 @@
,@
(
awhen
(
accum-var
state
)
(
list
it
))))
(
full
`
(
block
,
(
name
state
)
,@
(
prologue-wrap
(
prologue
state
)
main
))))
(
if
(
accum-var
state
)
`
((
lambda
()
,
full
))
`
(
chain
(
lambda
()
,
full
)
(
call
this
)
)
full
))))
src/special-operators.lisp
View file @
116f9ca9
...
...
@@ -418,7 +418,7 @@ Parenscript now implements implicit return, update your code! Things like (lambd
(
ps-gensym
(
symbol-name
x
))))
(
defun
with-lambda-scope
(
body
)
(
prog1
`
((
lambda
()
,
body
))
(
prog1
`
(
chain
(
lambda
()
,
body
)
(
call
this
)
)
(
setf
*vars-needing-to-be-declared*
())))
(
define-expression-operator
let
(
bindings
&body
body
)
...
...
Vladimir Sedach
@vsedach
mentioned in commit
b51f35a7
·
Jul 01, 2017
mentioned in commit
b51f35a7
mentioned in commit b51f35a70fe4da8dce1530afece1fb52d575378e
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment