mirror of
https://github.com/github/semantic.git
synced 2024-11-29 02:44:36 +03:00
Assign the source and range to syntax nodes.
This commit is contained in:
parent
fe274fc595
commit
c9e08610eb
@ -58,7 +58,8 @@
|
||||
function Term(json, source) {
|
||||
this.range = json.extract;
|
||||
this.syntax = syntax(json.unwrap, function(x) { return new Term(x, source); });
|
||||
this.textContent = source.substr(this.range[0], this.range[1]);
|
||||
this.syntax.source = source.substr(this.range[0], this.range[1]);
|
||||
this.syntax.range = this.range;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user