mirror of
https://github.com/github/semantic.git
synced 2024-12-21 05:41:54 +03:00
15 lines
264 B
JavaScript
15 lines
264 B
JavaScript
function termFromJSON(json) {
|
|
return new Term({
|
|
extract: json.extract,
|
|
unwrap: new Syntax(json.unwrap, function(x) {
|
|
return termFromJSON(x);
|
|
})
|
|
});
|
|
}
|
|
|
|
function Term(object) {
|
|
this.extract = object.extract;
|
|
this.unwrap = object.unwrap;
|
|
return this;
|
|
}
|