Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
See what's new at GitLab
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
K
Kawa
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
14
Issues
14
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
2
Merge Requests
2
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kashell
Kawa
Commits
aa67c9cb
Commit
aa67c9cb
authored
Jun 30, 2020
by
Per Bothner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* lang/BindDecls.java: Fix match for nested literal.
* match1.scm: Test for match for nested literal.
parent
e85ee67c
Pipeline
#161852404
failed with stage
in 5 minutes and 36 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
1 deletion
+14
-1
kawa/ChangeLog
kawa/ChangeLog
+4
-0
kawa/lang/BindDecls.java
kawa/lang/BindDecls.java
+3
-1
testsuite/ChangeLog
testsuite/ChangeLog
+4
-0
testsuite/match1.scm
testsuite/match1.scm
+3
-0
No files found.
kawa/ChangeLog
View file @
aa67c9cb
2020-06-30 Per Bothner <per@bothner.com>
* lang/BindDecls.java: Fix match for nested literal.
2020-06-15 Per Bothner <per@bothner.com>
* standard/make.java: Explicitly import kawa.lang.Record.
...
...
kawa/lang/BindDecls.java
View file @
aa67c9cb
...
...
@@ -63,7 +63,7 @@ public class BindDecls {
}
/** Parse a declaration or more generally a pattern.
* The actual pattern is an initial sublist (us
ing
just the initial
* The actual pattern is an initial sublist (us
ually
just the initial
* car) of the patList.
* @return A 2-element array, where element 0 is the unused remainder
* of patList, while element 1 is a Declaration for that pattern.
...
...
@@ -111,6 +111,8 @@ public class BindDecls {
QuoteExp
literal
=
literalPattern
(
patval
,
comp
);
if
(
literal
!=
null
)
{
decl
=
scope
.
addDeclaration
((
Object
)
null
);
if
(
init
!=
null
)
setInitializer
(
decl
,
init
,
scope
,
comp
);
addCondition
(
scope
,
compareLiteral
(
decl
,
literal
));
}
else
if
(
patval
instanceof
Symbol
)
{
if
(
patval
==
underScoreSymbol
)
{
...
...
testsuite/ChangeLog
View file @
aa67c9cb
2020-06-30 Duncan Mak <duncanmak@gmail.com>
* match1.scm: Test for match for nested literal.
2020-03-18 Per Bothner <per@bothner.com>
* formatst.scm: New tests, mainly srfi-48.
...
...
testsuite/match1.scm
View file @
aa67c9cb
...
...
@@ -112,3 +112,6 @@
(
newline
)
;; Output: match#2: ((double 3.4) (double 0.0) (pos-integer 12) (list (a b)) (other (a c)) (other str) (neg-integer -3) (zero-integer))
(
format
#t
"match-seq-quote <~s>~%"
(
match
'
(
foo
1
2
)
([
'foo
a
b
]
(
+
a
b
))))
;; Output: match-seq-quote <3>
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