tpmkms 9.8.0 → 9.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/actions.instance.json +10 -8
- package/common/actions.js +13 -11
- package/common/angle.instance.json +25 -17
- package/common/animals.instance.json +54 -28
- package/common/askfor.instance.json +89 -192
- package/common/askfor.js +49 -12
- package/common/asking.js +13 -5
- package/common/avatar.js +3 -3
- package/common/can.instance.json +32 -20
- package/common/can.js +2 -2
- package/common/colors.instance.json +44 -16
- package/common/colors.js +1 -1
- package/common/comparable.instance.json +25 -22
- package/common/compass.instance.json +9 -3
- package/common/concept.instance.json +14 -6
- package/common/concept.js +2 -0
- package/common/conjunction.js +17 -9
- package/common/control.js +10 -18
- package/common/countable.js +4 -3
- package/common/crew.instance.json +95 -27
- package/common/dateTimeSelectors.instance.json +4 -4
- package/common/dateTimeSelectors.js +4 -7
- package/common/dates.instance.json +52 -28
- package/common/dates.js +16 -11
- package/common/debug.instance.json +48 -0
- package/common/debug.js +50 -0
- package/common/debug.test.json +1 -0
- package/common/dialogues.js +126 -70
- package/common/dimension.instance.json +239 -495
- package/common/dimension.js +51 -9
- package/common/drone.instance.json +395 -84
- package/common/drone.js +43 -50
- package/common/drone_v1.instance.json +36 -12
- package/common/drone_v1.js +14 -9
- package/common/edible.instance.json +96 -32
- package/common/emotions.instance.json +15 -1
- package/common/evaluate.js +10 -13
- package/common/fastfood.instance.json +282 -100
- package/common/fastfood.js +30 -15
- package/common/formulas.instance.json +162 -24
- package/common/formulas.js +18 -9
- package/common/gdefaults.js +20 -96
- package/common/helpers/concept.js +2 -9
- package/common/helpers/conjunction.js +11 -1
- package/common/helpers/dialogues.js +48 -24
- package/common/helpers/gdefaults.js +15 -5
- package/common/helpers/properties.js +125 -326
- package/common/helpers.js +28 -58
- package/common/hierarchy.js +71 -41
- package/common/kirk.instance.json +3 -1
- package/common/latin.instance.json +10 -10
- package/common/latin.js +5 -5
- package/common/length.instance.json +247 -61
- package/common/math.instance.json +144 -5
- package/common/math.js +18 -5
- package/common/menus.instance.json +29 -11
- package/common/menus.js +8 -5
- package/common/meta.js +14 -13
- package/common/nameable.js +9 -5
- package/common/numbers.instance.json +5 -3
- package/common/numbers.js +28 -28
- package/common/ordering.instance.json +53 -4
- package/common/ordinals.js +25 -25
- package/common/people.instance.json +66 -12
- package/common/percentages.js +4 -2
- package/common/pipboy.instance.json +89 -44
- package/common/pipboy.js +21 -14
- package/common/pokemon.instance.json +39 -13
- package/common/pressure.instance.json +14 -6
- package/common/properties.instance.json +2370 -511
- package/common/properties.js +496 -78
- package/common/punctuation.js +1 -0
- package/common/rates.instance.json +2 -2
- package/common/rates.js +3 -3
- package/common/reminders.instance.json +16 -0
- package/common/reminders.js +24 -20
- package/common/reports.instance.json +11 -12
- package/common/reports.js +12 -12
- package/common/scorekeeper.js +20 -10
- package/common/sdefaults.js +30 -9
- package/common/spock.instance.json +3 -1
- package/common/stm.js +16 -21
- package/common/temperature.instance.json +19 -11
- package/common/testing.js +2 -2
- package/common/time.instance.json +104 -47
- package/common/time.js +9 -8
- package/common/ui.instance.json +4 -2
- package/common/ui.js +5 -5
- package/common/weight.instance.json +86 -21
- package/common/weight.js +5 -1
- package/common/words.js +113 -2
- package/common/wp.instance.json +125 -18
- package/common/wp.js +6 -2
- package/main.js +2 -0
- package/package.json +7 -3
package/common/helpers.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const pluralize = require('pluralize')
|
|
2
|
-
const { flatten } = require('./runtime').theprogrammablemind
|
|
2
|
+
const { flatten, debug } = require('./runtime').theprogrammablemind
|
|
3
|
+
// const { asList } = require('./helpers/conjunction.js')
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Memoize an async function.
|
|
@@ -101,6 +102,10 @@ function isMany(context) {
|
|
|
101
102
|
}
|
|
102
103
|
}
|
|
103
104
|
|
|
105
|
+
if (context.isPropertyValue) {
|
|
106
|
+
return false
|
|
107
|
+
}
|
|
108
|
+
|
|
104
109
|
let number = context.number
|
|
105
110
|
if (context.quantity) {
|
|
106
111
|
if (context.quantity.number) {
|
|
@@ -159,10 +164,29 @@ function zip(...arrays) {
|
|
|
159
164
|
|
|
160
165
|
function focus(context) {
|
|
161
166
|
function helper(context) {
|
|
162
|
-
|
|
167
|
+
let focusable = context?.focusable
|
|
168
|
+
if (!focusable && context.marker == 'list') {
|
|
169
|
+
focusable = ['value']
|
|
170
|
+
}
|
|
171
|
+
if (!focusable) {
|
|
163
172
|
return null
|
|
164
173
|
}
|
|
165
|
-
for (const property of
|
|
174
|
+
for (const property of focusable) {
|
|
175
|
+
if (Array.isArray(context[property])) {
|
|
176
|
+
const array = context[property]
|
|
177
|
+
const focussed = []
|
|
178
|
+
for (const value of array) {
|
|
179
|
+
const focus = helper(value)
|
|
180
|
+
if (focus) {
|
|
181
|
+
focussed.push(focus)
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
if (focussed) {
|
|
185
|
+
return focussed
|
|
186
|
+
}
|
|
187
|
+
continue
|
|
188
|
+
}
|
|
189
|
+
|
|
166
190
|
let focus = helper(context[property])
|
|
167
191
|
if (!focus) {
|
|
168
192
|
const flat = flatten(['list'], context[property])[0]
|
|
@@ -228,7 +252,7 @@ function toEValue(context) {
|
|
|
228
252
|
}
|
|
229
253
|
|
|
230
254
|
function toFinalValue(context) {
|
|
231
|
-
while( context
|
|
255
|
+
while( context?.evalue || context?.value ) {
|
|
232
256
|
if (context.evalue) {
|
|
233
257
|
context = context.evalue
|
|
234
258
|
} else {
|
|
@@ -259,7 +283,6 @@ function defaultContextCheck({marker, extra = [], exported = false} = {}) {
|
|
|
259
283
|
if (marker) {
|
|
260
284
|
match = ({context}) => context.marker == marker
|
|
261
285
|
} else {
|
|
262
|
-
match = () => true
|
|
263
286
|
}
|
|
264
287
|
return {
|
|
265
288
|
marker,
|
|
@@ -380,58 +403,6 @@ async function processTemplateString(template, evaluate) {
|
|
|
380
403
|
return await processTemplateString(template)
|
|
381
404
|
}
|
|
382
405
|
|
|
383
|
-
// removeProp.js
|
|
384
|
-
function removeProp(obj, testFn, { maxDepth = Infinity, seen = new WeakSet() } = {}) {
|
|
385
|
-
if (!obj || typeof obj !== 'object' || maxDepth <= 0) return obj;
|
|
386
|
-
if (seen.has(obj)) return obj;
|
|
387
|
-
seen.add(obj);
|
|
388
|
-
|
|
389
|
-
if (Array.isArray(obj)) {
|
|
390
|
-
// ---- ARRAY: process each element (but don't remove elements unless testFn says so)
|
|
391
|
-
let writeIdx = 0;
|
|
392
|
-
for (let i = 0; i < obj.length; i++) {
|
|
393
|
-
const element = obj[i];
|
|
394
|
-
const shouldRemoveElement = testFn(element, i, obj);
|
|
395
|
-
|
|
396
|
-
if (shouldRemoveElement) {
|
|
397
|
-
// Remove the whole array element
|
|
398
|
-
if (element && typeof element === 'object') {
|
|
399
|
-
// Still walk inside it in case testFn wants side effects
|
|
400
|
-
removeProp(element, testFn, { maxDepth: maxDepth - 1, seen });
|
|
401
|
-
}
|
|
402
|
-
// Skip writing it back
|
|
403
|
-
} else {
|
|
404
|
-
// Keep element, but walk into it to remove inner props
|
|
405
|
-
removeProp(element, testFn, { maxDepth: maxDepth - 1, seen });
|
|
406
|
-
if (writeIdx !== i) {
|
|
407
|
-
obj[writeIdx] = element;
|
|
408
|
-
}
|
|
409
|
-
writeIdx++;
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
obj.length = writeIdx;
|
|
413
|
-
return obj;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
// ---- OBJECT: iterate over own keys
|
|
417
|
-
const keys = Reflect.ownKeys(obj);
|
|
418
|
-
for (const key of keys) {
|
|
419
|
-
const val = obj[key];
|
|
420
|
-
const shouldRemove = testFn(val, key, obj);
|
|
421
|
-
|
|
422
|
-
if (shouldRemove) {
|
|
423
|
-
delete obj[key];
|
|
424
|
-
if (val && typeof val === 'object') {
|
|
425
|
-
removeProp(val, testFn, { maxDepth: maxDepth - 1, seen });
|
|
426
|
-
}
|
|
427
|
-
} else {
|
|
428
|
-
removeProp(val, testFn, { maxDepth: maxDepth - 1, seen });
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
return obj;
|
|
433
|
-
}
|
|
434
|
-
|
|
435
406
|
module.exports = {
|
|
436
407
|
processTemplateString,
|
|
437
408
|
unshiftL,
|
|
@@ -457,7 +428,6 @@ module.exports = {
|
|
|
457
428
|
wordNumber,
|
|
458
429
|
requiredArgument,
|
|
459
430
|
isA,
|
|
460
|
-
removeProp,
|
|
461
431
|
concats,
|
|
462
432
|
memoizeAsync,
|
|
463
433
|
}
|
package/common/hierarchy.js
CHANGED
|
@@ -15,7 +15,7 @@ function getTypes( km, digraph, concept, instance ) {
|
|
|
15
15
|
return new Set([...set1].filter(x => set2.has(x)))
|
|
16
16
|
}
|
|
17
17
|
const descendants = digraph.descendants(concept.value || concept.marker)
|
|
18
|
-
const ancestors = digraph.ancestors(instance.evalue)
|
|
18
|
+
const ancestors = digraph.ancestors(instance.evalue || instance.value)
|
|
19
19
|
const common = intersect(ancestors, descendants)
|
|
20
20
|
const answer = Array.from(digraph.minima(common))
|
|
21
21
|
const words = answer.map( (value) => conceptAPI.getWordForValue(value) )
|
|
@@ -66,7 +66,14 @@ const config = {
|
|
|
66
66
|
{
|
|
67
67
|
notes: 'what type is pikachu',
|
|
68
68
|
where: where(),
|
|
69
|
-
match: ({context, hierarchy}) =>
|
|
69
|
+
match: ({context, hierarchy}) =>
|
|
70
|
+
hierarchy.isA(context.marker, 'is') &&
|
|
71
|
+
context.query &&
|
|
72
|
+
!context.one.pullFromContext &&
|
|
73
|
+
(context.one?.marker == 'type' || context.two?.marker == 'type') &&
|
|
74
|
+
!['what'].includes(context.one.marker) &&
|
|
75
|
+
!['what'].includes(context.two.marker) &&
|
|
76
|
+
(context.one.query || context.two.query),
|
|
70
77
|
apply: async ({context, hierarchy, km, log, e}) => {
|
|
71
78
|
const one = context.one;
|
|
72
79
|
const two = context.two;
|
|
@@ -78,7 +85,7 @@ const config = {
|
|
|
78
85
|
concept = two;
|
|
79
86
|
value = one;
|
|
80
87
|
}
|
|
81
|
-
let instance = await e(value)
|
|
88
|
+
let instance = await e(value, where())
|
|
82
89
|
if (instance.verbatim) {
|
|
83
90
|
context.evalue = { verbatim: instance.verbatim }
|
|
84
91
|
context.isResponse = true
|
|
@@ -108,11 +115,11 @@ const config = {
|
|
|
108
115
|
// types of job what are the types of animals -> next one
|
|
109
116
|
notes: 'type of pikachu', // the types of type is the next one
|
|
110
117
|
where: where(),
|
|
111
|
-
match: ({context}) => context.marker == 'type' && context.
|
|
118
|
+
match: ({context}) => context.marker == 'type' && context.objects[context.objects.length-1].number == 'one' && pluralize.isSingular(context.objects[0].word),
|
|
112
119
|
apply: async ({context, hierarchy, objects, e, gs, km, log}) => {
|
|
113
120
|
const concept = context.objects[0];
|
|
114
121
|
const value = context.objects[1];
|
|
115
|
-
let instance = await e(value)
|
|
122
|
+
let instance = await e(value, where())
|
|
116
123
|
if (instance.verbatim) {
|
|
117
124
|
context.evalue = { verbatim: instance.verbatim }
|
|
118
125
|
return
|
|
@@ -168,16 +175,27 @@ const config = {
|
|
|
168
175
|
{
|
|
169
176
|
notes: 'c is a y',
|
|
170
177
|
where: where(),
|
|
171
|
-
match: ({context, listable}) =>
|
|
178
|
+
match: ({context, listable}) => {
|
|
179
|
+
if (context.marker !== 'same') {
|
|
180
|
+
return
|
|
181
|
+
}
|
|
182
|
+
const { one, two } = context
|
|
183
|
+
return listable(one.marker, 'hierarchyAble') &&
|
|
184
|
+
!one.pullFromContext &&
|
|
185
|
+
!one.wantsValue &&
|
|
186
|
+
!two.pullFromContext &&
|
|
187
|
+
two.wantsValue
|
|
188
|
+
},
|
|
172
189
|
apply: async ({context, km, objects, asList, baseConfig : config}) => {
|
|
173
190
|
const api = km('properties').api
|
|
174
191
|
// mark c as an instance?
|
|
175
|
-
const
|
|
176
|
-
const
|
|
192
|
+
const { one, two } = context
|
|
193
|
+
const oneConcepts = asList(one);
|
|
194
|
+
const twoConcepts = asList(two);
|
|
177
195
|
for (let oneConcept of oneConcepts.value) {
|
|
178
196
|
for (let twoConcept of twoConcepts.value) {
|
|
179
|
-
oneConcept = await api.makeObject({config, context})
|
|
180
|
-
twoConcept = await api.makeObject({config, context:
|
|
197
|
+
oneConcept = await api.makeObject({config, context: one})
|
|
198
|
+
twoConcept = await api.makeObject({config, context: two})
|
|
181
199
|
api.rememberIsA(oneConcept, twoConcept)
|
|
182
200
|
}
|
|
183
201
|
}
|
|
@@ -187,15 +205,22 @@ const config = {
|
|
|
187
205
|
{
|
|
188
206
|
notes: 'an x is a y',
|
|
189
207
|
where: where(),
|
|
190
|
-
match: ({context, listable}) =>
|
|
208
|
+
match: ({context, listable}) => {
|
|
209
|
+
if (context.marker !== 'same') {
|
|
210
|
+
return
|
|
211
|
+
}
|
|
212
|
+
const { one, two } = context
|
|
213
|
+
return listable(one.marker, 'hierarchyAble') && !one.pullFromContext && one.wantsValue
|
|
214
|
+
},
|
|
191
215
|
apply: async ({context, km, objects, baseConfig : config, asList}) => {
|
|
192
216
|
const api = km('properties').api
|
|
193
|
-
const
|
|
194
|
-
const
|
|
217
|
+
const { one, two } = context
|
|
218
|
+
const oneConcepts = asList(one);
|
|
219
|
+
const twoConcepts = asList(two);
|
|
195
220
|
for (let oneConcept of oneConcepts.value) {
|
|
196
221
|
for (let twoConcept of twoConcepts.value) {
|
|
197
|
-
oneConcept = await api.makeObject({config, context})
|
|
198
|
-
twoConcept = await api.makeObject({config, context:
|
|
222
|
+
oneConcept = await api.makeObject({config, context: one})
|
|
223
|
+
twoConcept = await api.makeObject({config, context: two})
|
|
199
224
|
api.rememberIsA(oneConcept, twoConcept)
|
|
200
225
|
context.sameWasProcessed = true
|
|
201
226
|
}
|
|
@@ -206,52 +231,54 @@ const config = {
|
|
|
206
231
|
notes: 'humans are mammels',
|
|
207
232
|
where: where(),
|
|
208
233
|
match: ({debug, context, listable, hierarchy, isA, callId}) => {
|
|
209
|
-
|
|
210
|
-
|
|
234
|
+
if (context.marker !== 'same') {
|
|
235
|
+
return
|
|
236
|
+
}
|
|
237
|
+
const { one, two } = context
|
|
238
|
+
if (one.query || two.query) {
|
|
211
239
|
return
|
|
212
240
|
}
|
|
213
241
|
|
|
214
242
|
// let the "the metric system is a measurement system" threw but block 'the gender is male'
|
|
215
|
-
if (
|
|
243
|
+
if (one.theable && !two.determiner && !two.pullFromContext) {
|
|
216
244
|
return
|
|
217
245
|
}
|
|
218
|
-
if (
|
|
219
|
-
|
|
220
|
-
} else if (
|
|
221
|
-
|
|
222
|
-
} else if (
|
|
223
|
-
|
|
224
|
-
} else if (
|
|
225
|
-
|
|
226
|
-
//} else if (
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
} else if (context.same.marker !== 'unknown' && isA(context.same.marker, 'hierarchyAble') && !context.same.pullFromContext && context.same.word && pluralize.isSingular(context.same.word) && !context.same.instance) {
|
|
230
|
-
context.same.concept = true;
|
|
246
|
+
if (two.determiner && two.determiner.marker == 'a') {
|
|
247
|
+
two.concept = true;
|
|
248
|
+
} else if (two.word && pluralize.isPlural(two.word)) {
|
|
249
|
+
two.concept = true;
|
|
250
|
+
} else if (one.number == 'many') {
|
|
251
|
+
two.concept = true;
|
|
252
|
+
//} else if (!two.determiner && pluralize.isSingular(two.word) && !two.isInstance) {
|
|
253
|
+
// two.concept = true;
|
|
254
|
+
// } else if (false && isA(two.marker, 'hierarchyAble') && two.word && pluralize.isSingular(two.word) && !two.isInstance) {
|
|
255
|
+
} else if (two.marker !== 'unknown' && isA(two.marker, 'hierarchyAble') && !two.pullFromContext && two.word && pluralize.isSingular(two.word) && !two.isInstance) {
|
|
256
|
+
two.concept = true;
|
|
231
257
|
} else {
|
|
232
258
|
return
|
|
233
259
|
}
|
|
234
260
|
|
|
235
|
-
if ((hierarchy.isA(
|
|
261
|
+
if ((hierarchy.isA(one.marker, 'property') && two && one.objects)|| ((two||{}).marker === 'readonly')) {
|
|
236
262
|
return;
|
|
237
263
|
}
|
|
238
264
|
|
|
239
|
-
if (
|
|
240
|
-
|
|
265
|
+
if (two && two.word && pluralize.isPlural(two.word)) {
|
|
266
|
+
two.concept = true;
|
|
241
267
|
}
|
|
242
268
|
|
|
243
269
|
// getting 20 and allowing it to be a class name like "priority is a 20"
|
|
244
|
-
if (false &&
|
|
245
|
-
|
|
270
|
+
if (false && two && two.word && pluralize.isSingular(two.word)) {
|
|
271
|
+
two.concept = true;
|
|
246
272
|
}
|
|
247
273
|
|
|
248
|
-
return listable(
|
|
274
|
+
return listable(one, 'hierarchyAble') && two && two.concept && !one.query
|
|
249
275
|
},
|
|
250
276
|
apply: async (args) => {
|
|
251
277
|
const {callId, addWordToDictionary, config, objects, km, context, asList, listable} = args
|
|
278
|
+
const { one, two } = context
|
|
252
279
|
const api = km('properties').api
|
|
253
|
-
const oneConcepts = asList(
|
|
254
|
-
const twoConcepts = asList(
|
|
280
|
+
const oneConcepts = asList(one);
|
|
281
|
+
const twoConcepts = asList(two);
|
|
255
282
|
for (const oneConcept of oneConcepts.value) {
|
|
256
283
|
for (const twoConcept of twoConcepts.value) {
|
|
257
284
|
addWordToDictionary({ ...oneConcept, same: undefined })
|
|
@@ -271,7 +298,7 @@ const config = {
|
|
|
271
298
|
// types of job
|
|
272
299
|
notes: 'types of type', // what are the types of animals
|
|
273
300
|
where: where(),
|
|
274
|
-
match: ({context}) => context.marker == 'type' && context.
|
|
301
|
+
match: ({context}) => context.marker == 'type' && context.objects,
|
|
275
302
|
apply: ({context, objects, km, isA}) => {
|
|
276
303
|
const api = km('properties').api
|
|
277
304
|
const conceptApi = km('concept').api
|
|
@@ -316,7 +343,10 @@ knowledgeModule( {
|
|
|
316
343
|
contents: hierarchy_tests,
|
|
317
344
|
// TODO doesnt this need the KM
|
|
318
345
|
checks: {
|
|
319
|
-
objects: [
|
|
346
|
+
objects: [
|
|
347
|
+
'children', 'concept', 'parents', 'properties',
|
|
348
|
+
{ km: 'properties' },
|
|
349
|
+
],
|
|
320
350
|
context: [
|
|
321
351
|
defaultContextCheck(),
|
|
322
352
|
],
|
|
@@ -106,7 +106,6 @@
|
|
|
106
106
|
"level": 2,
|
|
107
107
|
"context_index": 1,
|
|
108
108
|
"topLevel": true,
|
|
109
|
-
"context_id": 2,
|
|
110
109
|
"touchedBy": [
|
|
111
110
|
"kirk#call2"
|
|
112
111
|
]
|
|
@@ -232,6 +231,9 @@
|
|
|
232
231
|
}
|
|
233
232
|
],
|
|
234
233
|
"learned_contextual_priorities": [],
|
|
234
|
+
"explain_associations_details": [
|
|
235
|
+
null
|
|
236
|
+
],
|
|
235
237
|
"query": "you are kirk",
|
|
236
238
|
"key": {
|
|
237
239
|
"query": "you are kirk"
|
|
@@ -131,12 +131,12 @@
|
|
|
131
131
|
"match": "same",
|
|
132
132
|
"left": [
|
|
133
133
|
{
|
|
134
|
-
"pattern": "($type && context.
|
|
134
|
+
"pattern": "($type && context.isInstance == variables.isInstance)"
|
|
135
135
|
}
|
|
136
136
|
],
|
|
137
137
|
"right": [
|
|
138
138
|
{
|
|
139
|
-
"pattern": "($type && context.
|
|
139
|
+
"pattern": "($type && context.isInstance == variables.isInstance)"
|
|
140
140
|
}
|
|
141
141
|
],
|
|
142
142
|
"passthrough": true
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
"match": "same",
|
|
151
151
|
"left": [
|
|
152
152
|
{
|
|
153
|
-
"pattern": "($type && context.
|
|
153
|
+
"pattern": "($type && context.isInstance == variables.isInstance)"
|
|
154
154
|
}
|
|
155
155
|
],
|
|
156
156
|
"passthrough": true
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
},
|
|
160
160
|
{
|
|
161
161
|
"id": "queryMarker",
|
|
162
|
-
"bridge": "{ ...before[0], verb: before[0], interpolate: [{ context: before[0] }, '', { context: operator }], question: true }",
|
|
162
|
+
"bridge": "{ ...before[0], verb: before[0], interpolate: [{ context: before[0] }, { separator: '' }, { context: operator }], question: true }",
|
|
163
163
|
"separators": "|",
|
|
164
164
|
"before": [
|
|
165
165
|
"hierarchy"
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
"listable"
|
|
174
174
|
]
|
|
175
175
|
],
|
|
176
|
-
"bridge": "{ ...before[0], verb: before[0], interpolate: [{ context: before[0] }, '', { context: operator }], isList: true }",
|
|
176
|
+
"bridge": "{ ...before[0], verb: before[0], interpolate: [{ context: before[0] }, { separator: '' }, { context: operator }], isList: true }",
|
|
177
177
|
"separators": "|"
|
|
178
178
|
},
|
|
179
179
|
{
|
|
@@ -366,12 +366,12 @@
|
|
|
366
366
|
"match": "same",
|
|
367
367
|
"left": [
|
|
368
368
|
{
|
|
369
|
-
"pattern": "($type && context.
|
|
369
|
+
"pattern": "($type && context.isInstance == variables.isInstance)"
|
|
370
370
|
}
|
|
371
371
|
],
|
|
372
372
|
"right": [
|
|
373
373
|
{
|
|
374
|
-
"pattern": "($type && context.
|
|
374
|
+
"pattern": "($type && context.isInstance == variables.isInstance)"
|
|
375
375
|
}
|
|
376
376
|
],
|
|
377
377
|
"passthrough": true
|
|
@@ -385,7 +385,7 @@
|
|
|
385
385
|
"match": "same",
|
|
386
386
|
"left": [
|
|
387
387
|
{
|
|
388
|
-
"pattern": "($type && context.
|
|
388
|
+
"pattern": "($type && context.isInstance == variables.isInstance)"
|
|
389
389
|
}
|
|
390
390
|
],
|
|
391
391
|
"passthrough": true
|
|
@@ -394,7 +394,7 @@
|
|
|
394
394
|
},
|
|
395
395
|
{
|
|
396
396
|
"id": "queryMarker",
|
|
397
|
-
"bridge": "{ ...before[0], verb: before[0], interpolate: [{ context: before[0] }, '', { context: operator }], question: true }",
|
|
397
|
+
"bridge": "{ ...before[0], verb: before[0], interpolate: [{ context: before[0] }, { separator: '' }, { context: operator }], question: true }",
|
|
398
398
|
"separators": "|",
|
|
399
399
|
"before": [
|
|
400
400
|
"hierarchy"
|
|
@@ -408,7 +408,7 @@
|
|
|
408
408
|
"listable"
|
|
409
409
|
]
|
|
410
410
|
],
|
|
411
|
-
"bridge": "{ ...before[0], verb: before[0], interpolate: [{ context: before[0] }, '', { context: operator }], isList: true }",
|
|
411
|
+
"bridge": "{ ...before[0], verb: before[0], interpolate: [{ context: before[0] }, { separator: '' }, { context: operator }], isList: true }",
|
|
412
412
|
"separators": "|"
|
|
413
413
|
},
|
|
414
414
|
{
|
package/common/latin.js
CHANGED
|
@@ -86,8 +86,8 @@ const config = {
|
|
|
86
86
|
level: 0,
|
|
87
87
|
selector: {
|
|
88
88
|
match: "same",
|
|
89
|
-
left: [ { pattern: '($type && context.
|
|
90
|
-
right: [ { pattern: '($type && context.
|
|
89
|
+
left: [ { pattern: '($type && context.isInstance == variables.isInstance)' } ],
|
|
90
|
+
right: [ { pattern: '($type && context.isInstance == variables.isInstance)' } ],
|
|
91
91
|
passthrough: true
|
|
92
92
|
},
|
|
93
93
|
bridge: "{ ...next(operator), listable: true, isList: true, value: append(before, after), operator: operator, interpolate: [ { separator: 'operator', values: 'value' } ] }"
|
|
@@ -97,7 +97,7 @@ const config = {
|
|
|
97
97
|
level: 1,
|
|
98
98
|
selector: {
|
|
99
99
|
match: "same",
|
|
100
|
-
left: [ { pattern: '($type && context.
|
|
100
|
+
left: [ { pattern: '($type && context.isInstance == variables.isInstance)' } ],
|
|
101
101
|
passthrough: true
|
|
102
102
|
},
|
|
103
103
|
bridge: "{ ...operator, value: append(before, operator.value) }"
|
|
@@ -105,14 +105,14 @@ const config = {
|
|
|
105
105
|
|
|
106
106
|
{
|
|
107
107
|
id: "queryMarker",
|
|
108
|
-
bridge: "{ ...before[0], verb: before[0], interpolate: [{ context: before[0] }, '', { context: operator }], question: true }",
|
|
108
|
+
bridge: "{ ...before[0], verb: before[0], interpolate: [{ context: before[0] }, { separator: '' }, { context: operator }], question: true }",
|
|
109
109
|
separators: '|',
|
|
110
110
|
before: ['hierarchy'],
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
113
|
id: "listMarker",
|
|
114
114
|
localHierarchy: [['unknown', 'listable']],
|
|
115
|
-
bridge: "{ ...before[0], verb: before[0], interpolate: [{ context: before[0] }, '', { context: operator }], isList: true }",
|
|
115
|
+
bridge: "{ ...before[0], verb: before[0], interpolate: [{ context: before[0] }, { separator: '' }, { context: operator }], isList: true }",
|
|
116
116
|
separators: '|',
|
|
117
117
|
},
|
|
118
118
|
{ id: "hierarchiable" },
|