mirror of
https://github.com/github/semantic.git
synced 2024-11-29 02:44:36 +03:00
Simplify Syntax.map.
This commit is contained in:
parent
00234c1365
commit
eb598effa5
@ -150,9 +150,7 @@
|
|||||||
|
|
||||||
// forall a b. Syntax a -> (a -> b) -> Syntax b
|
// forall a b. Syntax a -> (a -> b) -> Syntax b
|
||||||
Syntax.prototype.map = function(transform) {
|
Syntax.prototype.map = function(transform) {
|
||||||
if (this.indexed != null) { return new Syntax(this, transform); }
|
return new Syntax(this, transform);
|
||||||
if (this.keyed != null) { return new Syntax(this, transform); }
|
|
||||||
if (this.leaf != null) { return new Syntax(this, transform); }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function diffFromJSON(json) {
|
function diffFromJSON(json) {
|
||||||
|
Loading…
Reference in New Issue
Block a user