123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- import defineInspect from "../jsutils/defineInspect.mjs";
- export var Location = function () {
-
-
-
-
-
- function Location(startToken, endToken, source) {
- this.start = startToken.start;
- this.end = endToken.end;
- this.startToken = startToken;
- this.endToken = endToken;
- this.source = source;
- }
- var _proto = Location.prototype;
- _proto.toJSON = function toJSON() {
- return {
- start: this.start,
- end: this.end
- };
- };
- return Location;
- }();
- defineInspect(Location);
- export var Token = function () {
-
-
-
-
-
-
-
- function Token(kind, start, end, line, column, prev, value) {
- this.kind = kind;
- this.start = start;
- this.end = end;
- this.line = line;
- this.column = column;
- this.value = value;
- this.prev = prev;
- this.next = null;
- }
- var _proto2 = Token.prototype;
- _proto2.toJSON = function toJSON() {
- return {
- kind: this.kind,
- value: this.value,
- line: this.line,
- column: this.column
- };
- };
- return Token;
- }();
- defineInspect(Token);
- export function isNode(maybeNode) {
- return maybeNode != null && typeof maybeNode.kind === 'string';
- }
|