@valtzu/codemirror-lang-el 0.6.1 → 0.6.2
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/dist/complete.cjs +10 -1
- package/dist/complete.js +10 -1
- package/dist/index.cjs +17 -8
- package/dist/index.js +17 -8
- package/dist/linter.cjs +10 -1
- package/dist/linter.js +10 -1
- package/dist/tooltip.cjs +10 -1
- package/dist/tooltip.js +10 -1
- package/package.json +1 -1
package/dist/complete.cjs
CHANGED
|
@@ -24,7 +24,7 @@ const resolveIdentifier = (nodeName, identifier, config) => {
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
function resolveTypes(state, node, config, matchExact) {
|
|
27
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
27
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
28
28
|
let types = new Set();
|
|
29
29
|
if (!node) {
|
|
30
30
|
return types;
|
|
@@ -65,6 +65,15 @@ function resolveTypes(state, node, config, matchExact) {
|
|
|
65
65
|
resolveTypes(state, node.firstChild.nextSibling, config).forEach(x => types.add(x));
|
|
66
66
|
resolveTypes(state, node.firstChild.nextSibling.nextSibling, config).forEach(x => types.add(x));
|
|
67
67
|
}
|
|
68
|
+
else if (node.name === 'BinaryExpression' && ((_k = (_j = node.firstChild) === null || _j === void 0 ? void 0 : _j.nextSibling) === null || _k === void 0 ? void 0 : _k.name) == 'Operator' && node.lastChild) {
|
|
69
|
+
const operator = state.sliceDoc(node.firstChild.nextSibling.from, node.firstChild.nextSibling.to);
|
|
70
|
+
if (operator == '?:' || operator == '??') {
|
|
71
|
+
resolveTypes(state, node.firstChild, config).forEach(x => types.add(x));
|
|
72
|
+
}
|
|
73
|
+
if (operator == '?:' || operator == '??' || operator == '?') {
|
|
74
|
+
resolveTypes(state, node.lastChild, config).forEach(x => types.add(x));
|
|
75
|
+
}
|
|
76
|
+
}
|
|
68
77
|
if (types.size === 0) {
|
|
69
78
|
types.add('any');
|
|
70
79
|
}
|
package/dist/complete.js
CHANGED
|
@@ -20,7 +20,7 @@ const resolveIdentifier = (nodeName, identifier, config) => {
|
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
function resolveTypes(state, node, config, matchExact) {
|
|
23
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
23
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
24
24
|
let types = new Set();
|
|
25
25
|
if (!node) {
|
|
26
26
|
return types;
|
|
@@ -61,6 +61,15 @@ function resolveTypes(state, node, config, matchExact) {
|
|
|
61
61
|
resolveTypes(state, node.firstChild.nextSibling, config).forEach(x => types.add(x));
|
|
62
62
|
resolveTypes(state, node.firstChild.nextSibling.nextSibling, config).forEach(x => types.add(x));
|
|
63
63
|
}
|
|
64
|
+
else if (node.name === 'BinaryExpression' && ((_k = (_j = node.firstChild) === null || _j === void 0 ? void 0 : _j.nextSibling) === null || _k === void 0 ? void 0 : _k.name) == 'Operator' && node.lastChild) {
|
|
65
|
+
const operator = state.sliceDoc(node.firstChild.nextSibling.from, node.firstChild.nextSibling.to);
|
|
66
|
+
if (operator == '?:' || operator == '??') {
|
|
67
|
+
resolveTypes(state, node.firstChild, config).forEach(x => types.add(x));
|
|
68
|
+
}
|
|
69
|
+
if (operator == '?:' || operator == '??' || operator == '?') {
|
|
70
|
+
resolveTypes(state, node.lastChild, config).forEach(x => types.add(x));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
64
73
|
if (types.size === 0) {
|
|
65
74
|
types.add('any');
|
|
66
75
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -12,20 +12,20 @@ var view = require('@codemirror/view');
|
|
|
12
12
|
|
|
13
13
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
14
14
|
const spec_word = {__proto__:null,true:80, false:82, null:84, starts:94, with:96, ends:98, contains:100, matches:102, not:104, in:106, and:108, or:110};
|
|
15
|
-
const spec_Operator = {__proto__:null,"!":113, "+":115, "-":117};
|
|
15
|
+
const spec_Operator = {__proto__:null,"?":93, "!":113, "+":115, "-":117};
|
|
16
16
|
const parser = lr.LRParser.deserialize({
|
|
17
17
|
version: 14,
|
|
18
|
-
states: "(pOVQPOOQ!QQPOOO!{QPO'#CdO$]QPO'#CmO$dQPO'#CnOVQPO'#CtOVQPO'#CvOOQO'#C|'#C|O$kQPO'#CcO$pQPO'#CcOOQO'#Ck'#CkOOQO'#Cl'#ClOOQO'#Cu'#CuO$uQPO,58xOVQPO,58|OVQPO,59
|
|
19
|
-
stateData: "+k~OoOS~O]VO^VOqQOsSOuUOxYOyYOzZO|RO!U[O!Y[O!Z[O![[O~OR]OS]
|
|
20
|
-
goto: "%]wPPxPP!Zxx!^!o!r#T#
|
|
21
|
-
nodeNames: "⚠ Expression ObjectAccess MemberOf NullSafeMemberOf Property ArrayAccess Call Function Arguments ObjectAccess Method Arguments Number String Boolean Null Object Array Variable TernaryExpression BinaryExpression OperatorKeyword
|
|
18
|
+
states: "(pOVQPOOQ!QQPOOO!{QPO'#CdO$]QPO'#CmO$dQPO'#CnOVQPO'#CtOVQPO'#CvOOQO'#C|'#C|O$kQPO'#CcO$pQPO'#CcOOQO'#Ck'#CkOOQO'#Cl'#ClOOQO'#Cu'#CuO$uQPO,58xOVQPO,58|OVQPO,59^OVQPO,59[O$zQPO'#CsOOQO'#Cs'#CsO%PQPO'#CsO%}QPO,59XOOQO,59X,59XO&UQPO'#DSO&cQPO,59YO&hQPO,59`O'OQPO,59bO'VQPO'#CeOOQO,58},58}O'VQPO'#ChO'^QPO'#CaOOQO1G.d1G.dOOQO1G.l1G.lO(nQPO1G.hO(uQPO1G.xO)]QPO1G.vOOQO,59_,59_OVQPO1G.sOVQPO'#CwO)dQPO,59nOOQO1G.t1G.tOOQO1G.|1G.|O)oQPO,59PO)tQPO,59SOOQO7+$S7+$SOVQPO7+$bO)yQPO7+$_O*TQPO,59cOOQO-E6u-E6uOOQO1G.k1G.kOOQO1G.n1G.nO*bQPO<<G|OVQPO'#CxO*xQPO<<GyOOQO<<Gy<<GyO+QQPO,59dOOQO-E6v-E6vOOQOAN=eAN=eOVQPO1G/OO+XQPO7+$j",
|
|
19
|
+
stateData: "+k~OoOS~O]VO^VOqQOsSOuUOxYOyYOzZO|RO!U[O!Y[O!Z[O![[O~OR]OS]Oe_Os^O!O`O!PaO!RaO!SbO!TbO!UcO!VbO!WbO!XbO~ORcXScXecXmcXscXuWX!OcX!PcX!RcX!ScX!TcX!UcX!VcX!WcX!XcX}cXrcXwcXtcX{cX~O{eO~PVOrvP~PVOujO~OulO~OqmO~O!QsO~O!VsO]gX^gXqgXsgXugXxgXygXzgX|gX!UgX!YgX!ZgX![gX~O}tO~P!QOwuOrvXtvX~P!QOrwO~Omha}harhawhatha{ha~P!QOtxO~P!QOtvP~PVORTXSTXeTXmTXsTXuZX!OTX!PTX!RTX!STX!TTX!UTX!VTX!WTX!XTX}TXrTXwTXtTX{TX~Or{O~P!QOmfi}firfiwfitfi{fi~P!QO}|O~P!QOwuOrvatva~Ot!QO~Ot!RO~Ow!TO{!VO~P!QOrkawkatka~P!QOmdy}dyrdywdytdy{dy~P!QOw!TO{!YO~O}!ZO~P!QOwlq{lq~P!QO^SeR]qR~",
|
|
20
|
+
goto: "%]wPPxPP!Zxx!^!o!r#T#WPPxxxxxxPx#Zx#jx#{$RPPP$XPPPPP%SoVORSTU^_`jltu|!T!ZRn]oWORSTU^_`jltu|!T!ZRkWoXORSTU^_`jltu|!T!ZRo]RkXk_Pdfhipqr}!O!S!W![oTORSTU^_`jltu|!T!ZQvfR!PvQ!U}R!X!UQPOQdRUfSjlQhTQiUQp^Qq_Qr`Q}tQ!OuQ!S|Q!W!TR![!ZQgSQyjRzl",
|
|
21
|
+
nodeNames: "⚠ Expression ObjectAccess MemberOf NullSafeMemberOf Property ArrayAccess Call Function Arguments ObjectAccess Method Arguments Number String Boolean Null Object Array Variable TernaryExpression Operator BinaryExpression OperatorKeyword UnaryExpression UnaryOperator Application",
|
|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X#Y)|~*PR{|*Y}!O*Y!Q![*`~*]P!Q![*`~*eQ]~!Q![*`#R#S*Y~*nP!Q![)k~*tP;=`<%l)]~*zP!Q![(h~+SO}~~+VP!_!`#s~+_Re~!O!P+h![!]#{!a!b#{~+mOS~~+rSq~!Q![+m!c!}+m#R#S+m#T#o+m~,TOs~~,YOr~~,_O|~~,dPe~#p#q#{~,lO{~",
|
|
26
26
|
tokenizers: [0],
|
|
27
27
|
topRules: {"Expression":[0,1]},
|
|
28
|
-
specialized: [{term: 33, get: (value) => spec_word[value] || -1},{term:
|
|
28
|
+
specialized: [{term: 33, get: (value) => spec_word[value] || -1},{term: 21, get: (value) => spec_Operator[value] || -1}],
|
|
29
29
|
tokenPrec: 479
|
|
30
30
|
});
|
|
31
31
|
|
|
@@ -65,7 +65,7 @@ const resolveIdentifier = (nodeName, identifier, config) => {
|
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
function resolveTypes(state, node, config, matchExact) {
|
|
68
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
68
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
69
69
|
let types = new Set();
|
|
70
70
|
if (!node) {
|
|
71
71
|
return types;
|
|
@@ -106,6 +106,15 @@ function resolveTypes(state, node, config, matchExact) {
|
|
|
106
106
|
resolveTypes(state, node.firstChild.nextSibling, config).forEach(x => types.add(x));
|
|
107
107
|
resolveTypes(state, node.firstChild.nextSibling.nextSibling, config).forEach(x => types.add(x));
|
|
108
108
|
}
|
|
109
|
+
else if (node.name === 'BinaryExpression' && ((_k = (_j = node.firstChild) === null || _j === void 0 ? void 0 : _j.nextSibling) === null || _k === void 0 ? void 0 : _k.name) == 'Operator' && node.lastChild) {
|
|
110
|
+
const operator = state.sliceDoc(node.firstChild.nextSibling.from, node.firstChild.nextSibling.to);
|
|
111
|
+
if (operator == '?:' || operator == '??') {
|
|
112
|
+
resolveTypes(state, node.firstChild, config).forEach(x => types.add(x));
|
|
113
|
+
}
|
|
114
|
+
if (operator == '?:' || operator == '??' || operator == '?') {
|
|
115
|
+
resolveTypes(state, node.lastChild, config).forEach(x => types.add(x));
|
|
116
|
+
}
|
|
117
|
+
}
|
|
109
118
|
if (types.size === 0) {
|
|
110
119
|
types.add('any');
|
|
111
120
|
}
|
package/dist/index.js
CHANGED
|
@@ -8,20 +8,20 @@ import { showTooltip, hoverTooltip, EditorView } from '@codemirror/view';
|
|
|
8
8
|
|
|
9
9
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
10
10
|
const spec_word = {__proto__:null,true:80, false:82, null:84, starts:94, with:96, ends:98, contains:100, matches:102, not:104, in:106, and:108, or:110};
|
|
11
|
-
const spec_Operator = {__proto__:null,"!":113, "+":115, "-":117};
|
|
11
|
+
const spec_Operator = {__proto__:null,"?":93, "!":113, "+":115, "-":117};
|
|
12
12
|
const parser = LRParser.deserialize({
|
|
13
13
|
version: 14,
|
|
14
|
-
states: "(pOVQPOOQ!QQPOOO!{QPO'#CdO$]QPO'#CmO$dQPO'#CnOVQPO'#CtOVQPO'#CvOOQO'#C|'#C|O$kQPO'#CcO$pQPO'#CcOOQO'#Ck'#CkOOQO'#Cl'#ClOOQO'#Cu'#CuO$uQPO,58xOVQPO,58|OVQPO,59
|
|
15
|
-
stateData: "+k~OoOS~O]VO^VOqQOsSOuUOxYOyYOzZO|RO!U[O!Y[O!Z[O![[O~OR]OS]
|
|
16
|
-
goto: "%]wPPxPP!Zxx!^!o!r#T#
|
|
17
|
-
nodeNames: "⚠ Expression ObjectAccess MemberOf NullSafeMemberOf Property ArrayAccess Call Function Arguments ObjectAccess Method Arguments Number String Boolean Null Object Array Variable TernaryExpression BinaryExpression OperatorKeyword
|
|
14
|
+
states: "(pOVQPOOQ!QQPOOO!{QPO'#CdO$]QPO'#CmO$dQPO'#CnOVQPO'#CtOVQPO'#CvOOQO'#C|'#C|O$kQPO'#CcO$pQPO'#CcOOQO'#Ck'#CkOOQO'#Cl'#ClOOQO'#Cu'#Cu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]wPPxPP!Zxx!^!o!r#T#WPPxxxxxxPx#Zx#jx#{$RPPP$XPPPPP%SoVORSTU^_`jltu|!T!ZRn]oWORSTU^_`jltu|!T!ZRkWoXORSTU^_`jltu|!T!ZRo]RkXk_Pdfhipqr}!O!S!W![oTORSTU^_`jltu|!T!ZQvfR!PvQ!U}R!X!UQPOQdRUfSjlQhTQiUQp^Qq_Qr`Q}tQ!OuQ!S|Q!W!TR![!ZQgSQyjRzl",
|
|
17
|
+
nodeNames: "⚠ Expression ObjectAccess MemberOf NullSafeMemberOf Property ArrayAccess Call Function Arguments ObjectAccess Method Arguments Number String Boolean Null Object Array Variable TernaryExpression Operator BinaryExpression OperatorKeyword UnaryExpression UnaryOperator Application",
|
|
18
18
|
maxTerm: 58,
|
|
19
19
|
skippedNodes: [0],
|
|
20
20
|
repeatNodeCount: 2,
|
|
21
|
-
tokenData: ",l~RqXY#YYZ#Y]^#Ypq#Yqr#krs$Quv#{vw%zwx&Sxy'wyz'|z{(R{|#{|}(Z}!O#{!O!P(`!P!Q#{!Q![(h![!]*}!^!_#s!_!`+S!`!a#s!a!b+Y!c!}+m!}#O,O#P#Q,T#Q#R#{#R#S+m#T#o+m#o#p,Y#p#q,_#q#r,g#r#s#{~#_So~XY#YYZ#Y]^#Ypq#Y~#
|
|
21
|
+
tokenData: ",l~RqXY#YYZ#Y]^#Ypq#Yqr#krs$Quv#{vw%zwx&Sxy'wyz'|z{(R{|#{|}(Z}!O#{!O!P(`!P!Q#{!Q![(h![!]*}!^!_#s!_!`+S!`!a#s!a!b+Y!c!}+m!}#O,O#P#Q,T#Q#R#{#R#S+m#T#o+m#o#p,Y#p#q,_#q#r,g#r#s#{~#_So~XY#YYZ#Y]^#Ypq#Y~#pPe~!_!`#s~#xPe~!_!`#{~$QOe~~$TXOr$Qrs$ps#O$Q#O#P$u#P;'S$Q;'S;=`%t<%l~$Q~O$Q~~$p~$uO^~~$xRO;'S$Q;'S;=`%R;=`O$Q~%UYOr$Qrs$ps#O$Q#O#P$u#P;'S$Q;'S;=`%t;=`<%l$Q<%l~$Q~O$Q~~$p~%wP;=`<%l$Q~&PPe~vw#{~&VXOw&Swx$px#O&S#O#P&r#P;'S&S;'S;=`'q<%l~&S~O&S~~$p~&uRO;'S&S;'S;=`'O;=`O&S~'RYOw&Swx$px#O&S#O#P&r#P;'S&S;'S;=`'q;=`<%l&S<%l~&S~O&S~~$p~'tP;=`<%l&S~'|Ou~~(ROt~~(WPe~z{#{~(`Ow~~(ePR~!O!P#{~(mT]~!O!P(|!Q![(h!g!h)|#R#S*w#X#Y)|~)PSO!O)]!P;'S)];'S;=`*q<%lO)]~)bR]~!Q![)k!g!h)|#X#Y)|~)pS]~!Q![)k!g!h)|#R#S*k#X#Y)|~*PR{|*Y}!O*Y!Q![*`~*]P!Q![*`~*eQ]~!Q![*`#R#S*Y~*nP!Q![)k~*tP;=`<%l)]~*zP!Q![(h~+SO}~~+VP!_!`#s~+_Re~!O!P+h![!]#{!a!b#{~+mOS~~+rSq~!Q![+m!c!}+m#R#S+m#T#o+m~,TOs~~,YOr~~,_O|~~,dPe~#p#q#{~,lO{~",
|
|
22
22
|
tokenizers: [0],
|
|
23
23
|
topRules: {"Expression":[0,1]},
|
|
24
|
-
specialized: [{term: 33, get: (value) => spec_word[value] || -1},{term:
|
|
24
|
+
specialized: [{term: 33, get: (value) => spec_word[value] || -1},{term: 21, get: (value) => spec_Operator[value] || -1}],
|
|
25
25
|
tokenPrec: 479
|
|
26
26
|
});
|
|
27
27
|
|
|
@@ -61,7 +61,7 @@ const resolveIdentifier = (nodeName, identifier, config) => {
|
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
function resolveTypes(state, node, config, matchExact) {
|
|
64
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
64
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
65
65
|
let types = new Set();
|
|
66
66
|
if (!node) {
|
|
67
67
|
return types;
|
|
@@ -102,6 +102,15 @@ function resolveTypes(state, node, config, matchExact) {
|
|
|
102
102
|
resolveTypes(state, node.firstChild.nextSibling, config).forEach(x => types.add(x));
|
|
103
103
|
resolveTypes(state, node.firstChild.nextSibling.nextSibling, config).forEach(x => types.add(x));
|
|
104
104
|
}
|
|
105
|
+
else if (node.name === 'BinaryExpression' && ((_k = (_j = node.firstChild) === null || _j === void 0 ? void 0 : _j.nextSibling) === null || _k === void 0 ? void 0 : _k.name) == 'Operator' && node.lastChild) {
|
|
106
|
+
const operator = state.sliceDoc(node.firstChild.nextSibling.from, node.firstChild.nextSibling.to);
|
|
107
|
+
if (operator == '?:' || operator == '??') {
|
|
108
|
+
resolveTypes(state, node.firstChild, config).forEach(x => types.add(x));
|
|
109
|
+
}
|
|
110
|
+
if (operator == '?:' || operator == '??' || operator == '?') {
|
|
111
|
+
resolveTypes(state, node.lastChild, config).forEach(x => types.add(x));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
105
114
|
if (types.size === 0) {
|
|
106
115
|
types.add('any');
|
|
107
116
|
}
|
package/dist/linter.cjs
CHANGED
|
@@ -35,7 +35,7 @@ const resolveIdentifier = (nodeName, identifier, config) => {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
function resolveTypes(state, node, config, matchExact) {
|
|
38
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
38
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
39
39
|
let types = new Set();
|
|
40
40
|
if (!node) {
|
|
41
41
|
return types;
|
|
@@ -76,6 +76,15 @@ function resolveTypes(state, node, config, matchExact) {
|
|
|
76
76
|
resolveTypes(state, node.firstChild.nextSibling, config).forEach(x => types.add(x));
|
|
77
77
|
resolveTypes(state, node.firstChild.nextSibling.nextSibling, config).forEach(x => types.add(x));
|
|
78
78
|
}
|
|
79
|
+
else if (node.name === 'BinaryExpression' && ((_k = (_j = node.firstChild) === null || _j === void 0 ? void 0 : _j.nextSibling) === null || _k === void 0 ? void 0 : _k.name) == 'Operator' && node.lastChild) {
|
|
80
|
+
const operator = state.sliceDoc(node.firstChild.nextSibling.from, node.firstChild.nextSibling.to);
|
|
81
|
+
if (operator == '?:' || operator == '??') {
|
|
82
|
+
resolveTypes(state, node.firstChild, config).forEach(x => types.add(x));
|
|
83
|
+
}
|
|
84
|
+
if (operator == '?:' || operator == '??' || operator == '?') {
|
|
85
|
+
resolveTypes(state, node.lastChild, config).forEach(x => types.add(x));
|
|
86
|
+
}
|
|
87
|
+
}
|
|
79
88
|
if (types.size === 0) {
|
|
80
89
|
types.add('any');
|
|
81
90
|
}
|
package/dist/linter.js
CHANGED
|
@@ -31,7 +31,7 @@ const resolveIdentifier = (nodeName, identifier, config) => {
|
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
function resolveTypes(state, node, config, matchExact) {
|
|
34
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
34
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
35
35
|
let types = new Set();
|
|
36
36
|
if (!node) {
|
|
37
37
|
return types;
|
|
@@ -72,6 +72,15 @@ function resolveTypes(state, node, config, matchExact) {
|
|
|
72
72
|
resolveTypes(state, node.firstChild.nextSibling, config).forEach(x => types.add(x));
|
|
73
73
|
resolveTypes(state, node.firstChild.nextSibling.nextSibling, config).forEach(x => types.add(x));
|
|
74
74
|
}
|
|
75
|
+
else if (node.name === 'BinaryExpression' && ((_k = (_j = node.firstChild) === null || _j === void 0 ? void 0 : _j.nextSibling) === null || _k === void 0 ? void 0 : _k.name) == 'Operator' && node.lastChild) {
|
|
76
|
+
const operator = state.sliceDoc(node.firstChild.nextSibling.from, node.firstChild.nextSibling.to);
|
|
77
|
+
if (operator == '?:' || operator == '??') {
|
|
78
|
+
resolveTypes(state, node.firstChild, config).forEach(x => types.add(x));
|
|
79
|
+
}
|
|
80
|
+
if (operator == '?:' || operator == '??' || operator == '?') {
|
|
81
|
+
resolveTypes(state, node.lastChild, config).forEach(x => types.add(x));
|
|
82
|
+
}
|
|
83
|
+
}
|
|
75
84
|
if (types.size === 0) {
|
|
76
85
|
types.add('any');
|
|
77
86
|
}
|
package/dist/tooltip.cjs
CHANGED
|
@@ -42,7 +42,7 @@ const resolveIdentifier = (nodeName, identifier, config) => {
|
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
function resolveTypes(state, node, config, matchExact) {
|
|
45
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
45
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
46
46
|
let types = new Set();
|
|
47
47
|
if (!node) {
|
|
48
48
|
return types;
|
|
@@ -83,6 +83,15 @@ function resolveTypes(state, node, config, matchExact) {
|
|
|
83
83
|
resolveTypes(state, node.firstChild.nextSibling, config).forEach(x => types.add(x));
|
|
84
84
|
resolveTypes(state, node.firstChild.nextSibling.nextSibling, config).forEach(x => types.add(x));
|
|
85
85
|
}
|
|
86
|
+
else if (node.name === 'BinaryExpression' && ((_k = (_j = node.firstChild) === null || _j === void 0 ? void 0 : _j.nextSibling) === null || _k === void 0 ? void 0 : _k.name) == 'Operator' && node.lastChild) {
|
|
87
|
+
const operator = state.sliceDoc(node.firstChild.nextSibling.from, node.firstChild.nextSibling.to);
|
|
88
|
+
if (operator == '?:' || operator == '??') {
|
|
89
|
+
resolveTypes(state, node.firstChild, config).forEach(x => types.add(x));
|
|
90
|
+
}
|
|
91
|
+
if (operator == '?:' || operator == '??' || operator == '?') {
|
|
92
|
+
resolveTypes(state, node.lastChild, config).forEach(x => types.add(x));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
86
95
|
if (types.size === 0) {
|
|
87
96
|
types.add('any');
|
|
88
97
|
}
|
package/dist/tooltip.js
CHANGED
|
@@ -38,7 +38,7 @@ const resolveIdentifier = (nodeName, identifier, config) => {
|
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
function resolveTypes(state, node, config, matchExact) {
|
|
41
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
41
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
42
42
|
let types = new Set();
|
|
43
43
|
if (!node) {
|
|
44
44
|
return types;
|
|
@@ -79,6 +79,15 @@ function resolveTypes(state, node, config, matchExact) {
|
|
|
79
79
|
resolveTypes(state, node.firstChild.nextSibling, config).forEach(x => types.add(x));
|
|
80
80
|
resolveTypes(state, node.firstChild.nextSibling.nextSibling, config).forEach(x => types.add(x));
|
|
81
81
|
}
|
|
82
|
+
else if (node.name === 'BinaryExpression' && ((_k = (_j = node.firstChild) === null || _j === void 0 ? void 0 : _j.nextSibling) === null || _k === void 0 ? void 0 : _k.name) == 'Operator' && node.lastChild) {
|
|
83
|
+
const operator = state.sliceDoc(node.firstChild.nextSibling.from, node.firstChild.nextSibling.to);
|
|
84
|
+
if (operator == '?:' || operator == '??') {
|
|
85
|
+
resolveTypes(state, node.firstChild, config).forEach(x => types.add(x));
|
|
86
|
+
}
|
|
87
|
+
if (operator == '?:' || operator == '??' || operator == '?') {
|
|
88
|
+
resolveTypes(state, node.lastChild, config).forEach(x => types.add(x));
|
|
89
|
+
}
|
|
90
|
+
}
|
|
82
91
|
if (types.size === 0) {
|
|
83
92
|
types.add('any');
|
|
84
93
|
}
|
package/package.json
CHANGED