Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
alexandria
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Momchil Ivanov
alexandria
Commits
2b1eb406
Commit
2b1eb406
authored
Jan 26, 2013
by
Nikodemus Siivola
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add existence of &KEY to return-values of PARSE-ORDINARY-LAMBDA-LIST
parent
107eb17c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
macros.lisp
macros.lisp
+6
-2
tests.lisp
tests.lisp
+10
-0
No files found.
macros.lisp
View file @
2b1eb406
...
...
@@ -112,6 +112,8 @@ arguments when given."
(name init).
7. Existence of &KEY in the lambda-list.
Signals a PROGRAM-ERROR is the lambda-list is malformed."
(
let
((
state
:required
)
(
allow-other-keys
nil
)
...
...
@@ -120,6 +122,7 @@ Signals a PROGRAM-ERROR is the lambda-list is malformed."
(
optional
nil
)
(
rest
nil
)
(
keys
nil
)
(
keyp
nil
)
(
aux
nil
))
(
labels
((
fail
(
elt
)
(
simple-program-error
"Misplaced ~S in ordinary lambda-list:~% ~S"
...
...
@@ -148,7 +151,8 @@ Signals a PROGRAM-ERROR is the lambda-list is malformed."
(
&key
(
if
(
member
state
'
(
:required
&optional
:after-rest
))
(
setf
state
elt
)
(
fail
elt
)))
(
fail
elt
))
(
setf
keyp
t
))
(
&allow-other-keys
(
if
(
eq
state
'&key
)
(
setf
allow-other-keys
t
...
...
@@ -229,7 +233,7 @@ Signals a PROGRAM-ERROR is the lambda-list is malformed."
(
t
(
simple-program-error
"Invalid ordinary lambda-list:~% ~S"
lambda-list
)))))))
(
values
(
nreverse
required
)
(
nreverse
optional
)
rest
(
nreverse
keys
)
allow-other-keys
(
nreverse
aux
))))
allow-other-keys
(
nreverse
aux
)
keyp
)))
;;;; DESTRUCTURING-*CASE
...
...
tests.lisp
View file @
2b1eb406
...
...
@@ -1885,3 +1885,13 @@
(
equal
'
(
#C
(
0.0
0.0
)
#C
(
0.0
2.0
)
#C
(
0.0
4.0
))
(
iota
3
:start
0.0
:step
#C
(
0
2
)))
t
)
(
deftest
parse-ordinary-lambda-list.1
(
multiple-value-bind
(
req
opt
rest
keys
allowp
aux
keyp
)
(
parse-ordinary-lambda-list
'
(
a
b
c
&optional
d
&key
))
(
and
(
equal
'
(
a
b
c
)
req
)
(
equal
'
((
d
nil
nil
))
opt
)
(
equal
'
()
keys
)
(
not
allowp
)
(
not
aux
)
(
eq
t
keyp
))))
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