mirror of
https://github.com/github/semantic.git
synced 2024-11-25 02:58:36 +03:00
Map Syntax by construction.
This commit is contained in:
parent
08927d06b5
commit
16876343a4
@ -232,9 +232,9 @@
|
||||
|
||||
// forall a b. Syntax a -> (a -> b) -> Syntax b
|
||||
Syntax.prototype.map = function(transform) {
|
||||
if (this.indexed != null) { return new Syntax(this.indexed, transform); }
|
||||
if (this.keyed != null) { return new Syntax(this.keyed, transform); }
|
||||
if (this.leaf != null) { return new Syntax(this.leaf, transform); }
|
||||
if (this.indexed != null) { return new Syntax(this, transform); }
|
||||
if (this.keyed != null) { return new Syntax(this, transform); }
|
||||
if (this.leaf != null) { return new Syntax(this, transform); }
|
||||
}
|
||||
|
||||
function Diff(json) {
|
||||
|
Loading…
Reference in New Issue
Block a user