hqchart 1.1.12851 → 1.1.12860
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.
|
@@ -112603,6 +112603,36 @@ function JSExecute(ast,option)
|
|
|
112603
112603
|
if (!Array.isArray(outVar)) outVar=this.SingleDataToArrayData(outVar);
|
|
112604
112604
|
this.OutVarTable.push({Name:varName, Data:outVar,Type:type, NoneName:true});
|
|
112605
112605
|
}
|
|
112606
|
+
else if (item.Expression.Type==Syntax.UnaryExpression)
|
|
112607
|
+
{
|
|
112608
|
+
var varName="__temp_l_"+i+"__";
|
|
112609
|
+
var argument=item.Expression.Argument;
|
|
112610
|
+
var type=0;
|
|
112611
|
+
let outVar=null;
|
|
112612
|
+
if (argument.Type==Syntax.Literal)
|
|
112613
|
+
{
|
|
112614
|
+
outVar=argument.Value;
|
|
112615
|
+
if (!Array.isArray(outVar)) outVar=this.SingleDataToArrayData(outVar);
|
|
112616
|
+
}
|
|
112617
|
+
else if (argument.Type==Syntax.Identifier)
|
|
112618
|
+
{
|
|
112619
|
+
let varName=argument.Name;
|
|
112620
|
+
outVar=this.ReadVariable(varName,item.Expression);
|
|
112621
|
+
if (!Array.isArray(outVar)) outVar=this.SingleDataToArrayData(outVar);
|
|
112622
|
+
}
|
|
112623
|
+
else if (argument.Type==Syntax.BinaryExpression)
|
|
112624
|
+
{
|
|
112625
|
+
outVar=argument.Out;
|
|
112626
|
+
if (!Array.isArray(outVar)) outVar=this.SingleDataToArrayData(outVar);
|
|
112627
|
+
}
|
|
112628
|
+
|
|
112629
|
+
if (item.Expression.Operator=='-')
|
|
112630
|
+
{
|
|
112631
|
+
if (outVar) outVar=this.Algorithm.Subtract(0,outVar);
|
|
112632
|
+
}
|
|
112633
|
+
|
|
112634
|
+
if (outVar) this.OutVarTable.push({Name:varName, Data:outVar,Type:type, NoneName:true});
|
|
112635
|
+
}
|
|
112606
112636
|
else if (item.Expression.Type==Syntax.SequenceExpression)
|
|
112607
112637
|
{
|
|
112608
112638
|
let varName;
|
|
@@ -112807,6 +112837,39 @@ function JSExecute(ast,option)
|
|
|
112807
112837
|
}
|
|
112808
112838
|
|
|
112809
112839
|
}
|
|
112840
|
+
else if (itemExpression.Type==Syntax.UnaryExpression)
|
|
112841
|
+
{
|
|
112842
|
+
if (j==0)
|
|
112843
|
+
{
|
|
112844
|
+
varName="__temp_sb_"+i+"__";
|
|
112845
|
+
var argument=itemExpression.Argument;
|
|
112846
|
+
let aryValue=null;
|
|
112847
|
+
if (argument.Type==Syntax.Literal)
|
|
112848
|
+
{
|
|
112849
|
+
aryValue=argument.Value;
|
|
112850
|
+
if (!Array.isArray(aryValue)) aryValue=this.SingleDataToArrayData(aryValue);
|
|
112851
|
+
}
|
|
112852
|
+
else if (argument.Type==Syntax.Identifier)
|
|
112853
|
+
{
|
|
112854
|
+
let varName=argument.Name;
|
|
112855
|
+
aryValue=this.ReadVariable(varName,item.Expression);
|
|
112856
|
+
if (!Array.isArray(aryValue)) aryValue=this.SingleDataToArrayData(aryValue);
|
|
112857
|
+
}
|
|
112858
|
+
else if (argument.Type==Syntax.BinaryExpression)
|
|
112859
|
+
{
|
|
112860
|
+
aryValue=argument.Out;
|
|
112861
|
+
if (!Array.isArray(aryValue)) aryValue=this.SingleDataToArrayData(aryValue);
|
|
112862
|
+
}
|
|
112863
|
+
|
|
112864
|
+
if (itemExpression.Operator=='-')
|
|
112865
|
+
{
|
|
112866
|
+
if (aryValue) aryValue=this.Algorithm.Subtract(0,aryValue);
|
|
112867
|
+
}
|
|
112868
|
+
|
|
112869
|
+
isNoneName=true;
|
|
112870
|
+
this.VarTable.set(varName,aryValue);
|
|
112871
|
+
}
|
|
112872
|
+
}
|
|
112810
112873
|
}
|
|
112811
112874
|
|
|
112812
112875
|
if (pointDot && varName) //圆点
|
|
@@ -113088,9 +113151,27 @@ function JSExecute(ast,option)
|
|
|
113088
113151
|
case Syntax.CallExpression:
|
|
113089
113152
|
this.VisitCallExpression(node);
|
|
113090
113153
|
break;
|
|
113154
|
+
case Syntax.UnaryExpression:
|
|
113155
|
+
this.VisitUnaryExpression(node);
|
|
113156
|
+
break;
|
|
113091
113157
|
}
|
|
113092
113158
|
}
|
|
113093
113159
|
|
|
113160
|
+
this.VisitUnaryExpression=function(node)
|
|
113161
|
+
{
|
|
113162
|
+
if (node.Operator=='-')
|
|
113163
|
+
{
|
|
113164
|
+
var tempValue=this.GetNodeValueEx(node.Argument);
|
|
113165
|
+
var value=this.Algorithm.Subtract(0,tempValue);
|
|
113166
|
+
}
|
|
113167
|
+
else
|
|
113168
|
+
{
|
|
113169
|
+
var value=node.Argument.Value;
|
|
113170
|
+
}
|
|
113171
|
+
|
|
113172
|
+
return value;
|
|
113173
|
+
}
|
|
113174
|
+
|
|
113094
113175
|
this.VisitSequenceExpression=function(node)
|
|
113095
113176
|
{
|
|
113096
113177
|
for(let i in node.Expression)
|
|
@@ -113489,17 +113570,7 @@ function JSExecute(ast,option)
|
|
|
113489
113570
|
else if (right.Type==Syntax.MemberExpression)
|
|
113490
113571
|
value=this.ReadMemberVariable(right);
|
|
113491
113572
|
else if (right.Type==Syntax.UnaryExpression)
|
|
113492
|
-
|
|
113493
|
-
if (right.Operator=='-')
|
|
113494
|
-
{
|
|
113495
|
-
var tempValue=this.GetNodeValue(right.Argument);
|
|
113496
|
-
value=this.Algorithm.Subtract(0,tempValue);
|
|
113497
|
-
}
|
|
113498
|
-
else
|
|
113499
|
-
{
|
|
113500
|
-
value=right.Argument.Value;
|
|
113501
|
-
}
|
|
113502
|
-
}
|
|
113573
|
+
value=this.VisitUnaryExpression(right);
|
|
113503
113574
|
|
|
113504
113575
|
if (JS_EXECUTE_DEBUG_LOG) JSConsole.Complier.Log('[JSExecute::VisitAssignmentExpression]' , varName, ' = ',value);
|
|
113505
113576
|
|
|
@@ -113605,6 +113676,20 @@ function JSExecute(ast,option)
|
|
|
113605
113676
|
|
|
113606
113677
|
}
|
|
113607
113678
|
|
|
113679
|
+
//获取节点值,BinaryExpression,LogicalExpression会重新计算
|
|
113680
|
+
this.GetNodeValueEx=function(item)
|
|
113681
|
+
{
|
|
113682
|
+
var value=null;
|
|
113683
|
+
if (item.Type==Syntax.BinaryExpression || item.Type==Syntax.LogicalExpression)
|
|
113684
|
+
value=this.VisitBinaryExpression(item);
|
|
113685
|
+
else if (item.Type==Syntax.CallExpression)
|
|
113686
|
+
value=this.VisitCallExpression(item);
|
|
113687
|
+
else
|
|
113688
|
+
value=this.GetNodeValue(item);
|
|
113689
|
+
|
|
113690
|
+
return value;
|
|
113691
|
+
}
|
|
113692
|
+
|
|
113608
113693
|
this.GetNodeValue=function(node)
|
|
113609
113694
|
{
|
|
113610
113695
|
switch(node.Type)
|
|
@@ -113612,21 +113697,14 @@ function JSExecute(ast,option)
|
|
|
113612
113697
|
case Syntax.Literal: //数字
|
|
113613
113698
|
return node.Value;
|
|
113614
113699
|
case Syntax.UnaryExpression:
|
|
113615
|
-
|
|
113616
|
-
|
|
113617
|
-
var value=this.GetNodeValue(node.Argument);
|
|
113618
|
-
return this.Algorithm.Subtract(0,value);
|
|
113619
|
-
}
|
|
113620
|
-
return node.Argument.Value;
|
|
113700
|
+
var value=this.VisitUnaryExpression(node);
|
|
113701
|
+
return value;
|
|
113621
113702
|
case Syntax.Identifier:
|
|
113622
113703
|
var value=this.ReadVariable(node.Name,node);
|
|
113623
113704
|
return value;
|
|
113624
113705
|
case Syntax.BinaryExpression:
|
|
113625
113706
|
case Syntax.LogicalExpression:
|
|
113626
|
-
|
|
113627
|
-
//如果没有数据需要重新计算
|
|
113628
|
-
JSConsole.Complier.Log('[JSExecute::GetNodeValue] VisitBinaryExpression', node);
|
|
113629
|
-
return this.VisitBinaryExpression(node);
|
|
113707
|
+
return node.Out;
|
|
113630
113708
|
case Syntax.CallExpression:
|
|
113631
113709
|
return this.VisitCallExpression(node);
|
|
113632
113710
|
case Syntax.MemberExpression:
|
|
@@ -113839,6 +113917,32 @@ function JSExplainer(ast,option)
|
|
|
113839
113917
|
let outVar=item.Expression.Out;
|
|
113840
113918
|
this.OutVarTable.push({Name:varName, Data:`输出: ${outVar}`,Type:0, NoneName:true});
|
|
113841
113919
|
}
|
|
113920
|
+
else if (item.Expression.Type==Syntax.UnaryExpression) //一元运算 如-C, -7, -(C+10)
|
|
113921
|
+
{
|
|
113922
|
+
var varName="__temp_l_"+i+"__";
|
|
113923
|
+
var argument=item.Expression.Argument;
|
|
113924
|
+
let outVar=null;
|
|
113925
|
+
if (argument.Type==Syntax.Literal)
|
|
113926
|
+
{
|
|
113927
|
+
outVar=argument.Value;
|
|
113928
|
+
}
|
|
113929
|
+
else if (argument.Type==Syntax.Identifier)
|
|
113930
|
+
{
|
|
113931
|
+
let varName=argument.Name;
|
|
113932
|
+
outVar=this.ReadVariable(varName,item.Expression);
|
|
113933
|
+
}
|
|
113934
|
+
else if (argument.Type==Syntax.BinaryExpression)
|
|
113935
|
+
{
|
|
113936
|
+
outVar=argument.Out;
|
|
113937
|
+
}
|
|
113938
|
+
|
|
113939
|
+
if (item.Expression.Operator=='-')
|
|
113940
|
+
{
|
|
113941
|
+
outVar=`-${outVar}`;
|
|
113942
|
+
}
|
|
113943
|
+
|
|
113944
|
+
this.OutVarTable.push({Name:varName, Data:`输出: ${outVar}`,Type:0, NoneName:true});
|
|
113945
|
+
}
|
|
113842
113946
|
else if (item.Expression.Type==Syntax.SequenceExpression)
|
|
113843
113947
|
{
|
|
113844
113948
|
let varName;
|
|
@@ -113942,6 +114046,33 @@ function JSExplainer(ast,option)
|
|
|
113942
114046
|
isNoneName=true;
|
|
113943
114047
|
this.VarTable.set(varName,aryValue);
|
|
113944
114048
|
}
|
|
114049
|
+
else if (itemExpression.Type==Syntax.UnaryExpression)
|
|
114050
|
+
{
|
|
114051
|
+
varName="__temp_sb_"+i+"__";
|
|
114052
|
+
var argument=itemExpression.Argument;
|
|
114053
|
+
let aryValue=null;
|
|
114054
|
+
if (argument.Type==Syntax.Literal)
|
|
114055
|
+
{
|
|
114056
|
+
aryValue=argument.Value;
|
|
114057
|
+
}
|
|
114058
|
+
else if (argument.Type==Syntax.Identifier)
|
|
114059
|
+
{
|
|
114060
|
+
let varName=argument.Name;
|
|
114061
|
+
aryValue=this.ReadVariable(varName,item.Expression);
|
|
114062
|
+
}
|
|
114063
|
+
else if (argument.Type==Syntax.BinaryExpression)
|
|
114064
|
+
{
|
|
114065
|
+
aryValue=argument.Out;
|
|
114066
|
+
}
|
|
114067
|
+
|
|
114068
|
+
if (itemExpression.Operator=='-')
|
|
114069
|
+
{
|
|
114070
|
+
aryValue=`-${aryValue}`;
|
|
114071
|
+
}
|
|
114072
|
+
|
|
114073
|
+
isNoneName=true;
|
|
114074
|
+
this.VarTable.set(varName,aryValue);
|
|
114075
|
+
}
|
|
113945
114076
|
}
|
|
113946
114077
|
|
|
113947
114078
|
var outValue;
|
|
@@ -114034,6 +114165,9 @@ function JSExplainer(ast,option)
|
|
|
114034
114165
|
case Syntax.CallExpression:
|
|
114035
114166
|
this.VisitCallExpression(node);
|
|
114036
114167
|
break;
|
|
114168
|
+
case Syntax.UnaryExpression:
|
|
114169
|
+
this.VisitUnaryExpression(node);
|
|
114170
|
+
break;
|
|
114037
114171
|
}
|
|
114038
114172
|
}
|
|
114039
114173
|
|
|
@@ -114046,6 +114180,17 @@ function JSExplainer(ast,option)
|
|
|
114046
114180
|
}
|
|
114047
114181
|
}
|
|
114048
114182
|
|
|
114183
|
+
this.VisitUnaryExpression=function(node)
|
|
114184
|
+
{
|
|
114185
|
+
if (node.Operator=='-')
|
|
114186
|
+
{
|
|
114187
|
+
let value=this.GetNodeValueEx(node.Argument);
|
|
114188
|
+
return '-'+value;
|
|
114189
|
+
}
|
|
114190
|
+
|
|
114191
|
+
return node.Argument.Value;
|
|
114192
|
+
}
|
|
114193
|
+
|
|
114049
114194
|
//函数调用
|
|
114050
114195
|
this.VisitCallExpression=function(node)
|
|
114051
114196
|
{
|
|
@@ -114537,17 +114682,7 @@ function JSExplainer(ast,option)
|
|
|
114537
114682
|
else if (right.Type==Syntax.MemberExpression)
|
|
114538
114683
|
value=this.ReadMemberVariable(right);
|
|
114539
114684
|
else if (right.Type==Syntax.UnaryExpression)
|
|
114540
|
-
|
|
114541
|
-
if (right.Operator=='-')
|
|
114542
|
-
{
|
|
114543
|
-
var tempValue=this.GetNodeValue(right.Argument);
|
|
114544
|
-
value='-'+tempValue;
|
|
114545
|
-
}
|
|
114546
|
-
else
|
|
114547
|
-
{
|
|
114548
|
-
value=right.Argument.Value;
|
|
114549
|
-
}
|
|
114550
|
-
}
|
|
114685
|
+
value=this.VisitUnaryExpression(right);
|
|
114551
114686
|
|
|
114552
114687
|
JSConsole.Complier.Log('[JSExplainer::VisitAssignmentExpression]' , varName, ' = ',value);
|
|
114553
114688
|
this.VarTable.set(varName,value);
|
|
@@ -114660,6 +114795,19 @@ function JSExplainer(ast,option)
|
|
|
114660
114795
|
|
|
114661
114796
|
}
|
|
114662
114797
|
|
|
114798
|
+
this.GetNodeValueEx=function(node)
|
|
114799
|
+
{
|
|
114800
|
+
var value=null;
|
|
114801
|
+
if (node.Type==Syntax.BinaryExpression || node.Type==Syntax.LogicalExpression)
|
|
114802
|
+
value=this.VisitBinaryExpression(node);
|
|
114803
|
+
else if (node.Type==Syntax.CallExpression)
|
|
114804
|
+
value=this.VisitCallExpression(node);
|
|
114805
|
+
else
|
|
114806
|
+
value=this.GetNodeValue(node);
|
|
114807
|
+
|
|
114808
|
+
return value;
|
|
114809
|
+
}
|
|
114810
|
+
|
|
114663
114811
|
this.GetNodeValue=function(node)
|
|
114664
114812
|
{
|
|
114665
114813
|
switch(node.Type)
|
|
@@ -114667,18 +114815,13 @@ function JSExplainer(ast,option)
|
|
|
114667
114815
|
case Syntax.Literal: //数字
|
|
114668
114816
|
return node.Value;
|
|
114669
114817
|
case Syntax.UnaryExpression:
|
|
114670
|
-
|
|
114671
|
-
{
|
|
114672
|
-
let value=this.GetNodeValue(node.Argument);
|
|
114673
|
-
return '-'+value;
|
|
114674
|
-
}
|
|
114675
|
-
return node.Argument.Value;
|
|
114818
|
+
return this.VisitUnaryExpression(node);
|
|
114676
114819
|
case Syntax.Identifier:
|
|
114677
114820
|
let value=this.ReadVariable(node.Name,node);
|
|
114678
114821
|
return value;
|
|
114679
114822
|
case Syntax.BinaryExpression:
|
|
114680
114823
|
case Syntax.LogicalExpression:
|
|
114681
|
-
return
|
|
114824
|
+
return node.Out;
|
|
114682
114825
|
case Syntax.CallExpression:
|
|
114683
114826
|
return this.VisitCallExpression(node);
|
|
114684
114827
|
default:
|
|
@@ -132041,7 +132184,7 @@ function HQChartScriptWorker()
|
|
|
132041
132184
|
|
|
132042
132185
|
|
|
132043
132186
|
|
|
132044
|
-
var HQCHART_VERSION="1.1.
|
|
132187
|
+
var HQCHART_VERSION="1.1.12859";
|
|
132045
132188
|
|
|
132046
132189
|
function PrintHQChartVersion()
|
|
132047
132190
|
{
|