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