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