mirror of
https://github.com/github/semantic.git
synced 2024-11-25 11:04:00 +03:00
Construct Syntax values correctly.
This commit is contained in:
parent
155b0a16ef
commit
08927d06b5
@ -224,9 +224,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Syntax(json, continuation) {
|
function Syntax(json, continuation) {
|
||||||
if (json instanceof Array) { this.indexed = json.map(continuation); }
|
if (json.indexed != null) { this.indexed = json.map(continuation); }
|
||||||
else if (json instanceof Object) { this.keyed = (new Dictionary(json)).map(continuation); }
|
if (json.keyed != null) { this.keyed = (new Dictionary(json)).map(continuation); }
|
||||||
else this.leaf = json;
|
if (json.leaf != null) { this.leaf = json; }
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user