-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support GENERATE * EXCEPT
functionality
#99
Conversation
GENERATE * EXCEPT
capabilityGENERATE * EXCEPT
functionality
@@ -123,6 +123,7 @@ | |||
(walk/postwalk remove-ws node))) | |||
|
|||
(defmacro match | |||
"Like core.match/match, but removes whitespace nodes before matching." | |||
[vars & clauses] | |||
(let [match (macrovich/case :clj 'clojure.core.match/match |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that the cljs compiler handles this resolution on its own. If you have clojure.blah
and that's not found, cljs will try to find cljs.blah
. That's why (:require [clojure.string :as ])
works in cljs, for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've never seen macrovich before, so I looked up what it's doing.
Apparently, the intent ofmacrovich/case
is for Clojurescript macros. Since Clojurescript macros are technically Clojure code, reader conditionals in them will pick the wrong environment, but not this, somehow.
I don't know what was happening before, but the commit message for the change, bdefd36, says fix(cljs): Get ClojureScript working again
, and the diff shows it was relying on cljs's backup loading scheme. Maybe that wasn't working properly, since it was inside macro? I don't know, but Zane might.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay! And I know I'm commenting outside of this PR... @zane do you remember what the error was that this addresses?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine though I am NOT the ideal reviewer for bnf grammar changes... is there some test you might add that checks the new behavior of the matcher?
Otherwise
@sritchie The grammar matching should be tested by the strict/permissive parser_test files. Was there another test you wanted to see? |
6e8700b
to
90cfd70
Compare
d100961
to
1fb8a6c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -123,6 +123,7 @@ | |||
(walk/postwalk remove-ws node))) | |||
|
|||
(defmacro match | |||
"Like core.match/match, but removes whitespace nodes before matching." | |||
[vars & clauses] | |||
(let [match (macrovich/case :clj 'clojure.core.match/match |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay! And I know I'm commenting outside of this PR... @zane do you remember what the error was that this addresses?
@KingMob looks great, no extra tests needed if those branches are covered! |
1fb8a6c
to
5a5786b
Compare
90cfd70
to
f7adbed
Compare
5a5786b
to
909b81d
Compare
f7adbed
to
3823297
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #99 +/- ##
==========================================
- Coverage 75.87% 75.60% -0.28%
==========================================
Files 30 30
Lines 1484 1496 +12
Branches 60 64 +4
==========================================
+ Hits 1126 1131 +5
- Misses 298 301 +3
- Partials 60 64 +4 ☔ View full report in Codecov by Sentry. |
909b81d
to
013d3ed
Compare
No description provided.