@gram-data/gram-ast
Advanced tools
Comparing version 0.2.9 to 0.2.10
@@ -47,3 +47,2 @@ 'use strict'; | ||
* | ||
* These AST elements | ||
* | ||
@@ -58,2 +57,10 @@ * References: | ||
/** | ||
* Type guard for GramSeq. | ||
* | ||
* @param o any object | ||
*/ | ||
var isGramSeq = function isGramSeq(o) { | ||
return !!o.type && o.type === 'seq'; | ||
}; | ||
/** | ||
* Type guard for a Path. | ||
@@ -63,2 +70,3 @@ * | ||
*/ | ||
var isGramPath = function isGramPath(o) { | ||
@@ -81,3 +89,3 @@ return !!o.type && o.type === 'path'; | ||
var isGramEmptyPath = function isGramEmptyPath(o) { | ||
return isGramPath(o) && o.children === undefined && o.id === EMPTY_PATH_ID; | ||
return isGramPath(o) && o.id === EMPTY_PATH_ID; | ||
}; | ||
@@ -102,2 +110,4 @@ /** | ||
* | ||
* An edge is a path composed of two nodes. | ||
* | ||
* @param o any object | ||
@@ -107,3 +117,3 @@ */ | ||
var isGramEdge = function isGramEdge(o) { | ||
return isGramPath(o) && o.relation !== undefined && o.relation !== 'pair' && o.children !== undefined && o.children.every(function (child) { | ||
return isGramPath(o) && o.kind !== undefined && o.kind !== 'pair' && o.children !== undefined && o.children.every(function (child) { | ||
return isGramNode(child); | ||
@@ -113,14 +123,2 @@ }); | ||
/** | ||
* Type guard for GramPathSequence. | ||
* | ||
* @param o any object | ||
*/ | ||
var isGramPathSequence = function isGramPathSequence(o) { | ||
return !!o.type && o.type === 'seq'; | ||
}; | ||
var isGramPathlike = function isGramPathlike(o) { | ||
return isGramPath(o) || isGramEmptyPath(o) || isGramNode(o) || isGramEdge(o) || isGramPathSequence(o); | ||
}; | ||
/** | ||
* A type guard to narrow a GramRecordValue to a GramRecord, | ||
@@ -175,3 +173,3 @@ * which is a GramProperty[]. | ||
/** | ||
* Type guard for GramPathSequence. | ||
* Type guard for GramSeq. | ||
* | ||
@@ -314,6 +312,5 @@ * @param o any object | ||
exports.isGramPath = isGramPath; | ||
exports.isGramPathSequence = isGramPathSequence; | ||
exports.isGramPathlike = isGramPathlike; | ||
exports.isGramProperty = isGramProperty; | ||
exports.isGramRecord = isGramRecord; | ||
exports.isGramSeq = isGramSeq; | ||
exports.isHexadecimalLiteral = isHexadecimalLiteral; | ||
@@ -320,0 +317,0 @@ exports.isIntegerLiteral = isIntegerLiteral; |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=/[0-9a-zA-Z_@]+\b@*/,t=new RegExp("^"+e.source+"$"),r={__proto__:null,boolean:/true|false|TRUE|FALSE\b(?!@)/,hexadecimal:/-?0x(?:[0-9a-fA-F]+)\b(?!@)/,octal:/-?0(?:[0-7]+)\b(?!@)/,measurement:/-?(?:[0-9]|[1-9][0-9]+)(?:\.[0-9]+)?[a-zA-Z]+\b(?!@)/,decimal:/-?(?:[0-9]|[1-9][0-9]+)\.[0-9]+(?:[eE][-+]?[0-9]+)?\b(?!@)/,integer:/-?(?:[0-9]|[1-9][0-9]+)(?:[eE][-+]?[0-9]+)?\b(?!@)/,taggedString:/[a-zA-Z][0-9a-zA-Z_@]*`(?:\\[`bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^`\\])*`/,doubleQuotedString:/"(?:\\["bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^"\\])*"/,singleQuotedString:/'(?:\\['bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^'\\])*'/,tickedString:/`(?:\\[`bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^`\\])*`/,symbol:/[a-zA-Z_][0-9a-zA-Z_]*\b(?!@)/,identifier:e,isValidIdentifier:function(e){return e&&t.test(e)}},n=function(e){return!!e.type&&"path"===e.type},a=function(e){return n(e)&&void 0===e.children&&"ø"===e.id},i=function(e){return n(e)&&e.children&&0===e.children.length&&"ø"!==e.id},u=function(e){return n(e)&&void 0!==e.relation&&"pair"!==e.relation&&void 0!==e.children&&e.children.every((function(e){return i(e)}))},o=function(e){return!!e.type&&"seq"===e.type},p=function(e){return!!e.type&&"property"===e.type},s=function(e){return!!e.type&&!!e.value&&"property"!==e.type};exports.EMPTY_PATH_ID="ø",exports.isBooleanLiteral=function(e){return!!e.type&&!!e.value&&"boolean"===e.type},exports.isDateLiteral=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"date"===e.tag},exports.isDateTimeLiteral=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"datetime"===e.tag},exports.isDecimalLiteral=function(e){return!!e.type&&!!e.value&&"decimal"===e.type},exports.isDuration=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"duration"===e.tag},exports.isGramEdge=u,exports.isGramEmptyPath=a,exports.isGramLiteralArray=function(e){return Array.isArray(e)&&s(e[0])},exports.isGramNode=i,exports.isGramPath=n,exports.isGramPathSequence=o,exports.isGramPathlike=function(e){return n(e)||a(e)||i(e)||u(e)||o(e)},exports.isGramProperty=p,exports.isGramRecord=function(e){return Array.isArray(e)&&p(e[0])},exports.isHexadecimalLiteral=function(e){return!!e.type&&!!e.value&&"hexadecimal"===e.type},exports.isIntegerLiteral=function(e){return!!e.type&&!!e.value&&"integer"===e.type},exports.isLiteral=s,exports.isMeasurementLiteral=function(e){return!!e.type&&!!e.value&&!!e.unit&&"measurement"===e.type},exports.isOctalLiteral=function(e){return!!e.type&&!!e.value&&"octal"===e.type},exports.isStringLiteral=function(e){return!!e.type&&!!e.value&&"string"===e.type},exports.isTaggedLiteral=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type},exports.isTimeInterval=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"interval"===e.tag},exports.isTimeLiteral=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"time"===e.tag},exports.isUriLiteral=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"uri"===e.tag},exports.isWellKnownTextLiteral=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"wkt"===e.tag},exports.tokens=r; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=/[0-9a-zA-Z_@]+\b@*/,t=new RegExp("^"+e.source+"$"),r={__proto__:null,boolean:/true|false|TRUE|FALSE\b(?!@)/,hexadecimal:/-?0x(?:[0-9a-fA-F]+)\b(?!@)/,octal:/-?0(?:[0-7]+)\b(?!@)/,measurement:/-?(?:[0-9]|[1-9][0-9]+)(?:\.[0-9]+)?[a-zA-Z]+\b(?!@)/,decimal:/-?(?:[0-9]|[1-9][0-9]+)\.[0-9]+(?:[eE][-+]?[0-9]+)?\b(?!@)/,integer:/-?(?:[0-9]|[1-9][0-9]+)(?:[eE][-+]?[0-9]+)?\b(?!@)/,taggedString:/[a-zA-Z][0-9a-zA-Z_@]*`(?:\\[`bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^`\\])*`/,doubleQuotedString:/"(?:\\["bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^"\\])*"/,singleQuotedString:/'(?:\\['bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^'\\])*'/,tickedString:/`(?:\\[`bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^`\\])*`/,symbol:/[a-zA-Z_][0-9a-zA-Z_]*\b(?!@)/,identifier:e,isValidIdentifier:function(e){return e&&t.test(e)}},n=function(e){return!!e.type&&"path"===e.type},a=function(e){return n(e)&&e.children&&0===e.children.length&&"ø"!==e.id},i=function(e){return!!e.type&&"property"===e.type},u=function(e){return!!e.type&&!!e.value&&"property"!==e.type};exports.EMPTY_PATH_ID="ø",exports.isBooleanLiteral=function(e){return!!e.type&&!!e.value&&"boolean"===e.type},exports.isDateLiteral=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"date"===e.tag},exports.isDateTimeLiteral=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"datetime"===e.tag},exports.isDecimalLiteral=function(e){return!!e.type&&!!e.value&&"decimal"===e.type},exports.isDuration=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"duration"===e.tag},exports.isGramEdge=function(e){return n(e)&&void 0!==e.kind&&"pair"!==e.kind&&void 0!==e.children&&e.children.every((function(e){return a(e)}))},exports.isGramEmptyPath=function(e){return n(e)&&"ø"===e.id},exports.isGramLiteralArray=function(e){return Array.isArray(e)&&u(e[0])},exports.isGramNode=a,exports.isGramPath=n,exports.isGramProperty=i,exports.isGramRecord=function(e){return Array.isArray(e)&&i(e[0])},exports.isGramSeq=function(e){return!!e.type&&"seq"===e.type},exports.isHexadecimalLiteral=function(e){return!!e.type&&!!e.value&&"hexadecimal"===e.type},exports.isIntegerLiteral=function(e){return!!e.type&&!!e.value&&"integer"===e.type},exports.isLiteral=u,exports.isMeasurementLiteral=function(e){return!!e.type&&!!e.value&&!!e.unit&&"measurement"===e.type},exports.isOctalLiteral=function(e){return!!e.type&&!!e.value&&"octal"===e.type},exports.isStringLiteral=function(e){return!!e.type&&!!e.value&&"string"===e.type},exports.isTaggedLiteral=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type},exports.isTimeInterval=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"interval"===e.tag},exports.isTimeLiteral=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"time"===e.tag},exports.isUriLiteral=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"uri"===e.tag},exports.isWellKnownTextLiteral=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"wkt"===e.tag},exports.tokens=r; | ||
//# sourceMappingURL=gram-ast.cjs.production.min.js.map |
@@ -43,3 +43,2 @@ var _boolean = /true|false|TRUE|FALSE\b(?!@)/; | ||
* | ||
* These AST elements | ||
* | ||
@@ -54,2 +53,10 @@ * References: | ||
/** | ||
* Type guard for GramSeq. | ||
* | ||
* @param o any object | ||
*/ | ||
var isGramSeq = function isGramSeq(o) { | ||
return !!o.type && o.type === 'seq'; | ||
}; | ||
/** | ||
* Type guard for a Path. | ||
@@ -59,2 +66,3 @@ * | ||
*/ | ||
var isGramPath = function isGramPath(o) { | ||
@@ -77,3 +85,3 @@ return !!o.type && o.type === 'path'; | ||
var isGramEmptyPath = function isGramEmptyPath(o) { | ||
return isGramPath(o) && o.children === undefined && o.id === EMPTY_PATH_ID; | ||
return isGramPath(o) && o.id === EMPTY_PATH_ID; | ||
}; | ||
@@ -98,2 +106,4 @@ /** | ||
* | ||
* An edge is a path composed of two nodes. | ||
* | ||
* @param o any object | ||
@@ -103,3 +113,3 @@ */ | ||
var isGramEdge = function isGramEdge(o) { | ||
return isGramPath(o) && o.relation !== undefined && o.relation !== 'pair' && o.children !== undefined && o.children.every(function (child) { | ||
return isGramPath(o) && o.kind !== undefined && o.kind !== 'pair' && o.children !== undefined && o.children.every(function (child) { | ||
return isGramNode(child); | ||
@@ -109,14 +119,2 @@ }); | ||
/** | ||
* Type guard for GramPathSequence. | ||
* | ||
* @param o any object | ||
*/ | ||
var isGramPathSequence = function isGramPathSequence(o) { | ||
return !!o.type && o.type === 'seq'; | ||
}; | ||
var isGramPathlike = function isGramPathlike(o) { | ||
return isGramPath(o) || isGramEmptyPath(o) || isGramNode(o) || isGramEdge(o) || isGramPathSequence(o); | ||
}; | ||
/** | ||
* A type guard to narrow a GramRecordValue to a GramRecord, | ||
@@ -171,3 +169,3 @@ * which is a GramProperty[]. | ||
/** | ||
* Type guard for GramPathSequence. | ||
* Type guard for GramSeq. | ||
* | ||
@@ -299,3 +297,3 @@ * @param o any object | ||
export { EMPTY_PATH_ID, isBooleanLiteral, isDateLiteral, isDateTimeLiteral, isDecimalLiteral, isDuration, isGramEdge, isGramEmptyPath, isGramLiteralArray, isGramNode, isGramPath, isGramPathSequence, isGramPathlike, isGramProperty, isGramRecord, isHexadecimalLiteral, isIntegerLiteral, isLiteral, isMeasurementLiteral, isOctalLiteral, isStringLiteral, isTaggedLiteral, isTimeInterval, isTimeLiteral, isUriLiteral, isWellKnownTextLiteral, gramTokens as tokens }; | ||
export { EMPTY_PATH_ID, isBooleanLiteral, isDateLiteral, isDateTimeLiteral, isDecimalLiteral, isDuration, isGramEdge, isGramEmptyPath, isGramLiteralArray, isGramNode, isGramPath, isGramProperty, isGramRecord, isGramSeq, isHexadecimalLiteral, isIntegerLiteral, isLiteral, isMeasurementLiteral, isOctalLiteral, isStringLiteral, isTaggedLiteral, isTimeInterval, isTimeLiteral, isUriLiteral, isWellKnownTextLiteral, gramTokens as tokens }; | ||
//# sourceMappingURL=gram-ast.esm.js.map |
@@ -49,3 +49,2 @@ (function (global, factory) { | ||
* | ||
* These AST elements | ||
* | ||
@@ -60,2 +59,10 @@ * References: | ||
/** | ||
* Type guard for GramSeq. | ||
* | ||
* @param o any object | ||
*/ | ||
var isGramSeq = function isGramSeq(o) { | ||
return !!o.type && o.type === 'seq'; | ||
}; | ||
/** | ||
* Type guard for a Path. | ||
@@ -65,2 +72,3 @@ * | ||
*/ | ||
var isGramPath = function isGramPath(o) { | ||
@@ -83,3 +91,3 @@ return !!o.type && o.type === 'path'; | ||
var isGramEmptyPath = function isGramEmptyPath(o) { | ||
return isGramPath(o) && o.children === undefined && o.id === EMPTY_PATH_ID; | ||
return isGramPath(o) && o.id === EMPTY_PATH_ID; | ||
}; | ||
@@ -104,2 +112,4 @@ /** | ||
* | ||
* An edge is a path composed of two nodes. | ||
* | ||
* @param o any object | ||
@@ -109,3 +119,3 @@ */ | ||
var isGramEdge = function isGramEdge(o) { | ||
return isGramPath(o) && o.relation !== undefined && o.relation !== 'pair' && o.children !== undefined && o.children.every(function (child) { | ||
return isGramPath(o) && o.kind !== undefined && o.kind !== 'pair' && o.children !== undefined && o.children.every(function (child) { | ||
return isGramNode(child); | ||
@@ -115,14 +125,2 @@ }); | ||
/** | ||
* Type guard for GramPathSequence. | ||
* | ||
* @param o any object | ||
*/ | ||
var isGramPathSequence = function isGramPathSequence(o) { | ||
return !!o.type && o.type === 'seq'; | ||
}; | ||
var isGramPathlike = function isGramPathlike(o) { | ||
return isGramPath(o) || isGramEmptyPath(o) || isGramNode(o) || isGramEdge(o) || isGramPathSequence(o); | ||
}; | ||
/** | ||
* A type guard to narrow a GramRecordValue to a GramRecord, | ||
@@ -177,3 +175,3 @@ * which is a GramProperty[]. | ||
/** | ||
* Type guard for GramPathSequence. | ||
* Type guard for GramSeq. | ||
* | ||
@@ -316,6 +314,5 @@ * @param o any object | ||
exports.isGramPath = isGramPath; | ||
exports.isGramPathSequence = isGramPathSequence; | ||
exports.isGramPathlike = isGramPathlike; | ||
exports.isGramProperty = isGramProperty; | ||
exports.isGramRecord = isGramRecord; | ||
exports.isGramSeq = isGramSeq; | ||
exports.isHexadecimalLiteral = isHexadecimalLiteral; | ||
@@ -322,0 +319,0 @@ exports.isIntegerLiteral = isIntegerLiteral; |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e=e||self).gram=e.gram||{},e.gram.ast={}))}(this,(function(e){"use strict";var t=/[0-9a-zA-Z_@]+\b@*/,r=new RegExp("^"+t.source+"$"),n={__proto__:null,boolean:/true|false|TRUE|FALSE\b(?!@)/,hexadecimal:/-?0x(?:[0-9a-fA-F]+)\b(?!@)/,octal:/-?0(?:[0-7]+)\b(?!@)/,measurement:/-?(?:[0-9]|[1-9][0-9]+)(?:\.[0-9]+)?[a-zA-Z]+\b(?!@)/,decimal:/-?(?:[0-9]|[1-9][0-9]+)\.[0-9]+(?:[eE][-+]?[0-9]+)?\b(?!@)/,integer:/-?(?:[0-9]|[1-9][0-9]+)(?:[eE][-+]?[0-9]+)?\b(?!@)/,taggedString:/[a-zA-Z][0-9a-zA-Z_@]*`(?:\\[`bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^`\\])*`/,doubleQuotedString:/"(?:\\["bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^"\\])*"/,singleQuotedString:/'(?:\\['bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^'\\])*'/,tickedString:/`(?:\\[`bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^`\\])*`/,symbol:/[a-zA-Z_][0-9a-zA-Z_]*\b(?!@)/,identifier:t,isValidIdentifier:function(e){return e&&r.test(e)}},i=function(e){return!!e.type&&"path"===e.type},a=function(e){return i(e)&&void 0===e.children&&"ø"===e.id},u=function(e){return i(e)&&e.children&&0===e.children.length&&"ø"!==e.id},o=function(e){return i(e)&&void 0!==e.relation&&"pair"!==e.relation&&void 0!==e.children&&e.children.every((function(e){return u(e)}))},l=function(e){return!!e.type&&"seq"===e.type},p=function(e){return!!e.type&&"property"===e.type},y=function(e){return!!e.type&&!!e.value&&"property"!==e.type};e.EMPTY_PATH_ID="ø",e.isBooleanLiteral=function(e){return!!e.type&&!!e.value&&"boolean"===e.type},e.isDateLiteral=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"date"===e.tag},e.isDateTimeLiteral=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"datetime"===e.tag},e.isDecimalLiteral=function(e){return!!e.type&&!!e.value&&"decimal"===e.type},e.isDuration=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"duration"===e.tag},e.isGramEdge=o,e.isGramEmptyPath=a,e.isGramLiteralArray=function(e){return Array.isArray(e)&&y(e[0])},e.isGramNode=u,e.isGramPath=i,e.isGramPathSequence=l,e.isGramPathlike=function(e){return i(e)||a(e)||u(e)||o(e)||l(e)},e.isGramProperty=p,e.isGramRecord=function(e){return Array.isArray(e)&&p(e[0])},e.isHexadecimalLiteral=function(e){return!!e.type&&!!e.value&&"hexadecimal"===e.type},e.isIntegerLiteral=function(e){return!!e.type&&!!e.value&&"integer"===e.type},e.isLiteral=y,e.isMeasurementLiteral=function(e){return!!e.type&&!!e.value&&!!e.unit&&"measurement"===e.type},e.isOctalLiteral=function(e){return!!e.type&&!!e.value&&"octal"===e.type},e.isStringLiteral=function(e){return!!e.type&&!!e.value&&"string"===e.type},e.isTaggedLiteral=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type},e.isTimeInterval=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"interval"===e.tag},e.isTimeLiteral=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"time"===e.tag},e.isUriLiteral=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"uri"===e.tag},e.isWellKnownTextLiteral=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"wkt"===e.tag},e.tokens=n,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e=e||self).gram=e.gram||{},e.gram.ast={}))}(this,(function(e){"use strict";var t=/[0-9a-zA-Z_@]+\b@*/,r=new RegExp("^"+t.source+"$"),n={__proto__:null,boolean:/true|false|TRUE|FALSE\b(?!@)/,hexadecimal:/-?0x(?:[0-9a-fA-F]+)\b(?!@)/,octal:/-?0(?:[0-7]+)\b(?!@)/,measurement:/-?(?:[0-9]|[1-9][0-9]+)(?:\.[0-9]+)?[a-zA-Z]+\b(?!@)/,decimal:/-?(?:[0-9]|[1-9][0-9]+)\.[0-9]+(?:[eE][-+]?[0-9]+)?\b(?!@)/,integer:/-?(?:[0-9]|[1-9][0-9]+)(?:[eE][-+]?[0-9]+)?\b(?!@)/,taggedString:/[a-zA-Z][0-9a-zA-Z_@]*`(?:\\[`bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^`\\])*`/,doubleQuotedString:/"(?:\\["bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^"\\])*"/,singleQuotedString:/'(?:\\['bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^'\\])*'/,tickedString:/`(?:\\[`bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^`\\])*`/,symbol:/[a-zA-Z_][0-9a-zA-Z_]*\b(?!@)/,identifier:t,isValidIdentifier:function(e){return e&&r.test(e)}},i=function(e){return!!e.type&&"path"===e.type},a=function(e){return i(e)&&e.children&&0===e.children.length&&"ø"!==e.id},u=function(e){return!!e.type&&"property"===e.type},o=function(e){return!!e.type&&!!e.value&&"property"!==e.type};e.EMPTY_PATH_ID="ø",e.isBooleanLiteral=function(e){return!!e.type&&!!e.value&&"boolean"===e.type},e.isDateLiteral=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"date"===e.tag},e.isDateTimeLiteral=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"datetime"===e.tag},e.isDecimalLiteral=function(e){return!!e.type&&!!e.value&&"decimal"===e.type},e.isDuration=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"duration"===e.tag},e.isGramEdge=function(e){return i(e)&&void 0!==e.kind&&"pair"!==e.kind&&void 0!==e.children&&e.children.every((function(e){return a(e)}))},e.isGramEmptyPath=function(e){return i(e)&&"ø"===e.id},e.isGramLiteralArray=function(e){return Array.isArray(e)&&o(e[0])},e.isGramNode=a,e.isGramPath=i,e.isGramProperty=u,e.isGramRecord=function(e){return Array.isArray(e)&&u(e[0])},e.isGramSeq=function(e){return!!e.type&&"seq"===e.type},e.isHexadecimalLiteral=function(e){return!!e.type&&!!e.value&&"hexadecimal"===e.type},e.isIntegerLiteral=function(e){return!!e.type&&!!e.value&&"integer"===e.type},e.isLiteral=o,e.isMeasurementLiteral=function(e){return!!e.type&&!!e.value&&!!e.unit&&"measurement"===e.type},e.isOctalLiteral=function(e){return!!e.type&&!!e.value&&"octal"===e.type},e.isStringLiteral=function(e){return!!e.type&&!!e.value&&"string"===e.type},e.isTaggedLiteral=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type},e.isTimeInterval=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"interval"===e.tag},e.isTimeLiteral=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"time"===e.tag},e.isUriLiteral=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"uri"===e.tag},e.isWellKnownTextLiteral=function(e){return!!e.type&&!!e.value&&!!e.tag&&"tagged"===e.type&&"wkt"===e.tag},e.tokens=n,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=gram-ast.umd.production.min.js.map |
/** | ||
* # Gram AST Types | ||
* | ||
* These AST elements | ||
* | ||
@@ -13,18 +12,39 @@ * References: | ||
import { Parent as UnistParent, Literal as UnistLiteral, Node as UnistNode } from 'unist'; | ||
export declare type AnyGramPath = GramNode | GramEdge | GramPath; | ||
/** | ||
* The base type for all path-like elements. | ||
* A GramSeq is a graph expressed as a sequence of paths. | ||
* | ||
*/ | ||
export interface GramPathlike extends UnistNode { | ||
export interface GramSeq extends UnistParent { | ||
/** | ||
* A unique path identifier. | ||
* Type discriminator for this AST element, aways 'seq'. | ||
*/ | ||
type: 'seq'; | ||
children: GramPath[]; | ||
} | ||
/** | ||
* Type guard for GramSeq. | ||
* | ||
* @param o any object | ||
*/ | ||
export declare const isGramSeq: (o: any) => o is GramSeq; | ||
/** | ||
* GramPath is composed of nodes, edges and other paths that have been composed | ||
* into a path expression. | ||
* | ||
*/ | ||
export interface GramPath extends UnistParent { | ||
/** | ||
* Type discriminator for this AST element, always 'path'. | ||
*/ | ||
type: 'path'; | ||
/** | ||
* An identifier for the path. | ||
* | ||
* For example, 'a' in `()-[a]->()` or '1' in `(1)` | ||
* For example, '1' in `()-[1]->()` or 'a' in `(a)` | ||
*/ | ||
id?: string; | ||
/** | ||
* The relationship between the left and right children, | ||
* or a 'pair' that associates without being navigable. | ||
* The kind of relationship between the path members. | ||
*/ | ||
relation?: Relation; | ||
kind?: RelationshipKind; | ||
/** | ||
@@ -41,24 +61,3 @@ * Labels are content. | ||
record?: GramRecord; | ||
children?: GramPath[]; | ||
} | ||
/** | ||
* GramPath contains nodes, edges and other paths that have been composed | ||
* into a path expression. | ||
* | ||
* - denoted with matching, non-empty square brackets: `[id]` | ||
* - path equivalence: `[]` | ||
* - identity: yes (required) | ||
* - children: yes (optional) | ||
* - labels: yes | ||
* - record: yes | ||
* - path length: sum(children[0].length, children[1].length) | ||
* - path cardinality: nodes().length | ||
* - information role: data annotation | ||
*/ | ||
export interface GramPath extends GramPathlike, UnistParent { | ||
/** | ||
* Type discriminator for this AST element, always 'path'. | ||
*/ | ||
type: 'path'; | ||
/** | ||
* Either: | ||
@@ -79,19 +78,10 @@ * - no children | ||
/** | ||
* A GramUnit is an empty path expression which contains no sub-paths and has no identity. | ||
* A GramEmptyPath is an empty path expression which contains no sub-paths and has no identity. | ||
* | ||
* - denoted with matching square brackets: `[]` | ||
* - path equivalence: `[]` | ||
* - identity: no | ||
* - children: no | ||
* - labels: no | ||
* - record: no | ||
* - path length: 0 | ||
* - path cardinality: 0 | ||
* - information role: emptiness | ||
*/ | ||
export interface GramEmptyPath extends GramPathlike { | ||
type: 'path'; | ||
id: 'ø'; | ||
export interface GramEmptyPath extends GramPath { | ||
id: typeof EMPTY_PATH_ID; | ||
labels: undefined; | ||
record: undefined; | ||
children: []; | ||
} | ||
@@ -144,31 +134,11 @@ /** | ||
/** | ||
* Navigable relations to compose path expressions. | ||
* Gram includes one extra relation that is not | ||
* navigable, the ',' pair relation used only in | ||
* path composition and not allowed in Edge definition. | ||
* | ||
* One of: | ||
* | ||
* - left `(a)<--(b)` | ||
* - right `(a)-->(b)` | ||
* - either `(a)--(b)` | ||
* - self `(a) =~ (a)--(a)` | ||
*/ | ||
export declare type Navigation = 'left' | 'right' | 'either'; | ||
export declare type Relation = Navigation | 'pair'; | ||
/** | ||
* GramEdge is a path composed of two GramNodes: | ||
* | ||
* - a path expression composing two nodes and a | ||
* - a path expression of length 1 | ||
* - logically equivalent to an empty path (path with no children) within an enclosing path: `(n) =~ [n []]` | ||
* - the operand in path expressions | ||
* - usually a noun concept | ||
*/ | ||
export interface GramEdge extends GramPath { | ||
/** | ||
* The operands of the Edge, known as "children" in the AST. | ||
* The adjacent Nodes of the Edge, known as "children" in the AST. | ||
* | ||
* children[0] is the 'left' child | ||
* children[1] is the 'right' child | ||
* children[0] is the 'left' Node | ||
* children[1] is the 'right' Node | ||
*/ | ||
@@ -180,2 +150,4 @@ children: [GramNode, GramNode]; | ||
* | ||
* An edge is a path composed of two nodes. | ||
* | ||
* @param o any object | ||
@@ -185,19 +157,36 @@ */ | ||
/** | ||
* A GramPathSeq is a sequence of paths. | ||
* Kind of path which is oriented | ||
* for navigation. | ||
* | ||
* One of: | ||
* | ||
* - left `(a)<--(b)` | ||
* - right `(a)-->(b)` | ||
* - either `(a)--(b)` | ||
* | ||
*/ | ||
export interface GramPathSeq extends GramPathlike { | ||
/** | ||
* Type discriminator for this AST element, aways 'seq'. | ||
*/ | ||
type: 'seq'; | ||
children: GramPath[]; | ||
} | ||
export declare type OrientedKind = 'left' | 'right' | 'either'; | ||
/** | ||
* Type guard for GramPathSequence. | ||
* RelationshipKind describes the kind of | ||
* relationship between composed paths. | ||
* | ||
* @param o any object | ||
* Classically this is the Orientation of | ||
* the edge between two nodes. | ||
* | ||
* Nodes can also be composed into a simple ordered | ||
* pair, which does not imply navigability. | ||
* Pairs enable compound paths to be assembled | ||
* which do not follow a linear flow. | ||
* | ||
* For example, this is a single path which | ||
* pairs two adjacent edges that coincide at `(a)`: | ||
* `(a)-->(b),(a)-->(c) | ||
* | ||
* One of: | ||
* | ||
* - Orientation | ||
* - pair `[a,b]` | ||
*/ | ||
export declare const isGramPathSequence: (o: any) => o is GramPathSeq; | ||
export declare const isGramPathlike: (o: any) => o is GramPathlike; | ||
export declare type RelationshipKind = OrientedKind | 'pair'; | ||
export declare type GramPathlike = GramPath | GramNode | GramEdge; | ||
/** | ||
@@ -260,9 +249,10 @@ * GramRecordValues are a union of literals and nested records. | ||
/** | ||
* GramLiteral is a data value represented as plain text. | ||
* Base interface for literals, all of which | ||
* only provide textual value representations. | ||
* | ||
*/ | ||
export interface GramLiteral extends UnistLiteral { | ||
type: string; | ||
interface TextLiteral extends UnistLiteral { | ||
value: string; | ||
} | ||
export declare type AnyGramLiteral = BooleanLiteral | StringLiteral | TaggedLiteral | IntegerLiteral | MeasurementLiteral | DecimalLiteral | HexadecimalLiteral | OctalLiteral; | ||
export declare type GramLiteral = BooleanLiteral | StringLiteral | TaggedLiteral | IntegerLiteral | MeasurementLiteral | DecimalLiteral | HexadecimalLiteral | OctalLiteral; | ||
/** | ||
@@ -273,7 +263,7 @@ * Type guard for GramLiteral. | ||
*/ | ||
export declare const isLiteral: (o: any) => o is GramLiteral; | ||
export declare const isLiteral: (o: any) => o is TextLiteral; | ||
/** | ||
* Represents a boolean literal, like `true` or `false`. | ||
*/ | ||
export interface BooleanLiteral extends GramLiteral { | ||
export interface BooleanLiteral extends TextLiteral { | ||
/** | ||
@@ -290,7 +280,7 @@ * Represents this variant of a Literal. | ||
*/ | ||
export declare const isBooleanLiteral: (o: any) => o is BooleanLiteral; | ||
export declare const isBooleanLiteral: (o: any) => o is TextLiteral; | ||
/** | ||
* Represents a string literal, like "hello". | ||
*/ | ||
export interface StringLiteral extends GramLiteral { | ||
export interface StringLiteral extends TextLiteral { | ||
/** | ||
@@ -306,3 +296,3 @@ * Represents this variant of a Literal. | ||
*/ | ||
export declare const isStringLiteral: (o: any) => o is StringLiteral; | ||
export declare const isStringLiteral: (o: any) => o is TextLiteral; | ||
/** | ||
@@ -323,3 +313,3 @@ * Represents a string value with a format indicated by a "tag". | ||
*/ | ||
export interface TaggedLiteral extends GramLiteral { | ||
export interface TaggedLiteral extends TextLiteral { | ||
type: 'tagged'; | ||
@@ -332,11 +322,11 @@ /** | ||
/** | ||
* Type guard for GramPathSequence. | ||
* Type guard for GramSeq. | ||
* | ||
* @param o any object | ||
*/ | ||
export declare const isTaggedLiteral: (o: any) => o is TaggedLiteral; | ||
export declare const isTaggedLiteral: (o: any) => o is TextLiteral; | ||
/** | ||
* Represents an integer number, like 235276234. | ||
*/ | ||
export interface IntegerLiteral extends GramLiteral { | ||
export interface IntegerLiteral extends TextLiteral { | ||
type: 'integer'; | ||
@@ -353,3 +343,3 @@ } | ||
*/ | ||
export interface MeasurementLiteral extends GramLiteral { | ||
export interface MeasurementLiteral extends TextLiteral { | ||
type: 'measurement'; | ||
@@ -370,3 +360,3 @@ /** | ||
*/ | ||
export interface DecimalLiteral extends GramLiteral { | ||
export interface DecimalLiteral extends TextLiteral { | ||
type: 'decimal'; | ||
@@ -385,3 +375,3 @@ } | ||
*/ | ||
export interface HexadecimalLiteral extends GramLiteral { | ||
export interface HexadecimalLiteral extends TextLiteral { | ||
type: 'hexadecimal'; | ||
@@ -401,3 +391,3 @@ } | ||
*/ | ||
export interface OctalLiteral extends GramLiteral { | ||
export interface OctalLiteral extends TextLiteral { | ||
type: 'octal'; | ||
@@ -537,1 +527,2 @@ } | ||
export declare const isUriLiteral: (o: any) => o is UriLiteral; | ||
export {}; |
@@ -9,3 +9,3 @@ { | ||
], | ||
"version": "0.2.9", | ||
"version": "0.2.10", | ||
"license": "MIT", | ||
@@ -69,3 +69,3 @@ "repository": { | ||
}, | ||
"gitHead": "1ff6bdb1c799a29a95540314bdb5b2a881971774", | ||
"gitHead": "5ab0f6f900db922abaf69906f62d6cf23e12215e", | ||
"publishConfig": { | ||
@@ -72,0 +72,0 @@ "access": "public" |
@@ -20,3 +20,3 @@ Gram abstract syntax tree definitions and utilities like type guards. | ||
// the top-level of the AST is a sequence of paths | ||
console.assert(isGramPathSequence(parsed)); | ||
console.assert(isGramSeq(parsed)); | ||
@@ -23,0 +23,0 @@ // the first path should be an edge |
/** | ||
* # Gram AST Types | ||
* | ||
* These AST elements | ||
* | ||
@@ -19,15 +18,40 @@ * References: | ||
/////////////////////////////////////////////////////////////////////////////// | ||
// Base ast types... | ||
/** | ||
* A GramSeq is a graph expressed as a sequence of paths. | ||
* | ||
*/ | ||
export interface GramSeq extends UnistParent { | ||
/** | ||
* Type discriminator for this AST element, aways 'seq'. | ||
*/ | ||
type: 'seq'; | ||
export type AnyGramPath = GramNode | GramEdge | GramPath; | ||
children: GramPath[]; | ||
} | ||
/** | ||
* The base type for all path-like elements. | ||
* Type guard for GramSeq. | ||
* | ||
* @param o any object | ||
*/ | ||
export interface GramPathlike extends UnistNode { | ||
export const isGramSeq = (o: any): o is GramSeq => !!o.type && o.type === 'seq'; | ||
/////////////////////////////////////////////////////////////////////////////// | ||
// Path-like types... | ||
/** | ||
* GramPath is composed of nodes, edges and other paths that have been composed | ||
* into a path expression. | ||
* | ||
*/ | ||
export interface GramPath extends UnistParent { | ||
/** | ||
* A unique path identifier. | ||
* Type discriminator for this AST element, always 'path'. | ||
*/ | ||
type: 'path'; | ||
/** | ||
* An identifier for the path. | ||
* | ||
* For example, 'a' in `()-[a]->()` or '1' in `(1)` | ||
* For example, '1' in `()-[1]->()` or 'a' in `(a)` | ||
*/ | ||
@@ -37,6 +61,5 @@ id?: string; | ||
/** | ||
* The relationship between the left and right children, | ||
* or a 'pair' that associates without being navigable. | ||
* The kind of relationship between the path members. | ||
*/ | ||
relation?: Relation; | ||
kind?: RelationshipKind; | ||
@@ -56,29 +79,3 @@ /** | ||
children?: GramPath[]; | ||
} | ||
/////////////////////////////////////////////////////////////////////////////// | ||
// Pathlike types... | ||
/** | ||
* GramPath contains nodes, edges and other paths that have been composed | ||
* into a path expression. | ||
* | ||
* - denoted with matching, non-empty square brackets: `[id]` | ||
* - path equivalence: `[]` | ||
* - identity: yes (required) | ||
* - children: yes (optional) | ||
* - labels: yes | ||
* - record: yes | ||
* - path length: sum(children[0].length, children[1].length) | ||
* - path cardinality: nodes().length | ||
* - information role: data annotation | ||
*/ | ||
export interface GramPath extends GramPathlike, UnistParent { | ||
/** | ||
* Type discriminator for this AST element, always 'path'. | ||
*/ | ||
type: 'path'; | ||
/** | ||
* Either: | ||
@@ -103,22 +100,13 @@ * - no children | ||
/** | ||
* A GramUnit is an empty path expression which contains no sub-paths and has no identity. | ||
* A GramEmptyPath is an empty path expression which contains no sub-paths and has no identity. | ||
* | ||
* - denoted with matching square brackets: `[]` | ||
* - path equivalence: `[]` | ||
* - identity: no | ||
* - children: no | ||
* - labels: no | ||
* - record: no | ||
* - path length: 0 | ||
* - path cardinality: 0 | ||
* - information role: emptiness | ||
*/ | ||
export interface GramEmptyPath extends GramPathlike { | ||
type: 'path'; | ||
export interface GramEmptyPath extends GramPath { | ||
id: typeof EMPTY_PATH_ID; | ||
id: 'ø'; | ||
labels: undefined; | ||
record: undefined; | ||
children: []; | ||
} | ||
@@ -138,3 +126,3 @@ | ||
export const isGramEmptyPath = (o: any): o is GramEmptyPath => | ||
isGramPath(o) && o.children === undefined && o.id === EMPTY_PATH_ID; | ||
isGramPath(o) && o.id === EMPTY_PATH_ID; | ||
@@ -181,33 +169,11 @@ /** | ||
/** | ||
* Navigable relations to compose path expressions. | ||
* Gram includes one extra relation that is not | ||
* navigable, the ',' pair relation used only in | ||
* path composition and not allowed in Edge definition. | ||
* | ||
* One of: | ||
* | ||
* - left `(a)<--(b)` | ||
* - right `(a)-->(b)` | ||
* - either `(a)--(b)` | ||
* - self `(a) =~ (a)--(a)` | ||
*/ | ||
export type Navigation = 'left' | 'right' | 'either'; | ||
export type Relation = Navigation | 'pair'; | ||
/** | ||
* GramEdge is a path composed of two GramNodes: | ||
* | ||
* - a path expression composing two nodes and a | ||
* - a path expression of length 1 | ||
* - logically equivalent to an empty path (path with no children) within an enclosing path: `(n) =~ [n []]` | ||
* - the operand in path expressions | ||
* - usually a noun concept | ||
*/ | ||
export interface GramEdge extends GramPath { | ||
/** | ||
* The operands of the Edge, known as "children" in the AST. | ||
* The adjacent Nodes of the Edge, known as "children" in the AST. | ||
* | ||
* children[0] is the 'left' child | ||
* children[1] is the 'right' child | ||
* children[0] is the 'left' Node | ||
* children[1] is the 'right' Node | ||
*/ | ||
@@ -220,2 +186,4 @@ children: [GramNode, GramNode]; | ||
* | ||
* An edge is a path composed of two nodes. | ||
* | ||
* @param o any object | ||
@@ -225,4 +193,4 @@ */ | ||
isGramPath(o) && | ||
o.relation !== undefined && | ||
o.relation !== 'pair' && | ||
o.kind !== undefined && | ||
o.kind !== 'pair' && | ||
o.children !== undefined && | ||
@@ -232,29 +200,46 @@ o.children.every(child => isGramNode(child)); | ||
/** | ||
* A GramPathSeq is a sequence of paths. | ||
* Kind of path which is oriented | ||
* for navigation. | ||
* | ||
* One of: | ||
* | ||
* - left `(a)<--(b)` | ||
* - right `(a)-->(b)` | ||
* - either `(a)--(b)` | ||
* | ||
*/ | ||
export interface GramPathSeq extends GramPathlike { | ||
/** | ||
* Type discriminator for this AST element, aways 'seq'. | ||
*/ | ||
type: 'seq'; | ||
export type OrientedKind = 'left' | 'right' | 'either'; | ||
children: GramPath[]; | ||
} | ||
/** | ||
* Type guard for GramPathSequence. | ||
* RelationshipKind describes the kind of | ||
* relationship between composed paths. | ||
* | ||
* @param o any object | ||
* Classically this is the Orientation of | ||
* the edge between two nodes. | ||
* | ||
* Nodes can also be composed into a simple ordered | ||
* pair, which does not imply navigability. | ||
* Pairs enable compound paths to be assembled | ||
* which do not follow a linear flow. | ||
* | ||
* For example, this is a single path which | ||
* pairs two adjacent edges that coincide at `(a)`: | ||
* `(a)-->(b),(a)-->(c) | ||
* | ||
* One of: | ||
* | ||
* - Orientation | ||
* - pair `[a,b]` | ||
*/ | ||
export const isGramPathSequence = (o: any): o is GramPathSeq => | ||
!!o.type && o.type === 'seq'; | ||
export type RelationshipKind = OrientedKind | 'pair'; | ||
export const isGramPathlike = (o: any): o is GramPathlike => | ||
isGramPath(o) || | ||
isGramEmptyPath(o) || | ||
isGramNode(o) || | ||
isGramEdge(o) || | ||
isGramPathSequence(o); | ||
export type GramPathlike = GramPath | GramNode | GramEdge; | ||
// export const isGramPathlike = (o: any): o is GramPathlike => | ||
// isGramPath(o) || | ||
// isGramEmptyPath(o) || | ||
// isGramNode(o) || | ||
// isGramEdge(o) || | ||
// isGramSeq(o); | ||
/////////////////////////////////////////////////////////////////////////////// | ||
@@ -330,10 +315,11 @@ // Records... | ||
/** | ||
* GramLiteral is a data value represented as plain text. | ||
* Base interface for literals, all of which | ||
* only provide textual value representations. | ||
* | ||
*/ | ||
export interface GramLiteral extends UnistLiteral { | ||
type: string; | ||
interface TextLiteral extends UnistLiteral { | ||
value: string; | ||
} | ||
export type AnyGramLiteral = | ||
export type GramLiteral = | ||
| BooleanLiteral | ||
@@ -353,3 +339,3 @@ | StringLiteral | ||
*/ | ||
export const isLiteral = (o: any): o is GramLiteral => | ||
export const isLiteral = (o: any): o is TextLiteral => | ||
!!o.type && !!o.value && o.type !== 'property'; | ||
@@ -360,3 +346,3 @@ | ||
*/ | ||
export interface BooleanLiteral extends GramLiteral { | ||
export interface BooleanLiteral extends TextLiteral { | ||
/** | ||
@@ -375,3 +361,3 @@ * Represents this variant of a Literal. | ||
*/ | ||
export const isBooleanLiteral = (o: any): o is BooleanLiteral => | ||
export const isBooleanLiteral = (o: any): o is TextLiteral => | ||
!!o.type && !!o.value && o.type === 'boolean'; | ||
@@ -382,3 +368,3 @@ | ||
*/ | ||
export interface StringLiteral extends GramLiteral { | ||
export interface StringLiteral extends TextLiteral { | ||
/** | ||
@@ -395,3 +381,3 @@ * Represents this variant of a Literal. | ||
*/ | ||
export const isStringLiteral = (o: any): o is StringLiteral => | ||
export const isStringLiteral = (o: any): o is TextLiteral => | ||
!!o.type && !!o.value && o.type === 'string'; | ||
@@ -414,3 +400,3 @@ | ||
*/ | ||
export interface TaggedLiteral extends GramLiteral { | ||
export interface TaggedLiteral extends TextLiteral { | ||
type: 'tagged'; | ||
@@ -425,7 +411,7 @@ | ||
/** | ||
* Type guard for GramPathSequence. | ||
* Type guard for GramSeq. | ||
* | ||
* @param o any object | ||
*/ | ||
export const isTaggedLiteral = (o: any): o is TaggedLiteral => | ||
export const isTaggedLiteral = (o: any): o is TextLiteral => | ||
!!o.type && !!o.value && !!o.tag && o.type === 'tagged'; | ||
@@ -436,3 +422,3 @@ | ||
*/ | ||
export interface IntegerLiteral extends GramLiteral { | ||
export interface IntegerLiteral extends TextLiteral { | ||
type: 'integer'; | ||
@@ -452,3 +438,3 @@ } | ||
*/ | ||
export interface MeasurementLiteral extends GramLiteral { | ||
export interface MeasurementLiteral extends TextLiteral { | ||
type: 'measurement'; | ||
@@ -473,3 +459,3 @@ | ||
*/ | ||
export interface DecimalLiteral extends GramLiteral { | ||
export interface DecimalLiteral extends TextLiteral { | ||
type: 'decimal'; | ||
@@ -491,3 +477,3 @@ } | ||
*/ | ||
export interface HexadecimalLiteral extends GramLiteral { | ||
export interface HexadecimalLiteral extends TextLiteral { | ||
type: 'hexadecimal'; | ||
@@ -510,3 +496,3 @@ } | ||
*/ | ||
export interface OctalLiteral extends GramLiteral { | ||
export interface OctalLiteral extends TextLiteral { | ||
type: 'octal'; | ||
@@ -513,0 +499,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
172646
2007