├── README.md ├── ecode.css ├── ecode.js └── index.html /README.md: -------------------------------------------------------------------------------- 1 | # Ecode 2 | Javascript易语言代码框 3 | 4 | ## 3.5.10 5 | 1. 删除存在的多余html标签 6 | 2. 备注对","的修复 7 | 8 | ## 3.5.9 9 | 1. 修复命令在字符串有括号情况下高亮错误 10 | 2. 增加代码高亮对日期时间型的支持 11 | 12 | ## 3.5.8 13 | 1. 修复类模块识别为程序集的问题 14 | 15 | ## 3.5.7 16 | 1. 修复改善流程线 17 | 18 | ## 3.5.6 19 | 1. 修复部分多维数组导致错误 20 | 21 | ## 3.5.5 22 | 1. 修复 且 和 或 显示错误 23 | 2. 修复当代码过长流程线显示错误 24 | 25 | ## 3.5.4 26 | 1. 修复部分备注错乱 27 | 2. 修复多个子程序不能完全显示 28 | 3. 修复判断嵌套流程线错位 29 | 30 | ## 3.5.3 31 | 1. 修复DLL公开勾符号 32 | 2. 修复单个判断流程线js报错 33 | 3. 修复备注高亮错误 34 | 4. 修复判断嵌套错误 35 | 5. 修复如果真流程线某些情况下出现过长 36 | 6. 修复命令嵌套未高亮 37 | 7. 改进流程线,更接近易语言原版IDE 38 | 39 | ## 3.5.1 40 | 1. 修复表格备注半角引号后内容不显示 41 | 42 | ## 3.5 43 | 1. 修复如果真流程线不一致 44 | 2. 修复部分注释代码内容被高亮 45 | 3. 添加且&或,真&假 46 | 4. 修复命令高亮的bug 47 | 48 | ## 3.4 (3.0的流程线部分推倒重做了) 49 | 1. 修复若干bug 50 | 2. 改进流程线 51 | 52 | ## 3.0 53 | 1. 此版本为重写版本, 与上一个版本不通用(废弃), 推荐用此版本 54 | 2. 添加流程线小箭头 55 | 3. 重写转换后的html结构, 便于自定义样式. 进行外部js修改简单 56 | 4. 无需像上版本需要特定格式的id名 57 | 5. 支持全局转换. 指定元素单个转换以及自定义目标元素数组转换 58 | 6. 容错性提高, 支持程序集代码 dll代码等多个部分同时存在的情况, 建议还是分开放置 59 | 7. 优化操作部分 60 | 8. 提高兼容性 61 | 62 | # 兼容性说明 63 | 1. 支持 Chrome 64 | 2. 支持 Firefox 65 | 3. 支持 Safari 66 | 4. 支持 IE 8+ 67 | 68 | # 使用说明 69 | 1. 引入ecode.css & ecode.js(可以自行下载,也可以直接从本站引用) 70 | 2. 创建Ecode对象 71 | 3. 使用对象的tran方法 72 | PS: 使用方法请参考本页面代码, 此版本为UTF-8版本, 如需其他编码格式请自行转码 73 | -------------------------------------------------------------------------------- /ecode.css: -------------------------------------------------------------------------------- 1 | /* Ecode 3.5.10 */ 2 | *{ 3 | margin:0px auto; 4 | padding: 0px auto; 5 | font-family: "微软雅黑", "Lucida Grande", "Lucida Sans", Helvetica, Arial, Sans 6 | } 7 | .ecode{ 8 | font-size: 12px; 9 | margin:0px auto; 10 | padding: 0px auto; 11 | float: left; 12 | position: relative; 13 | background-color: #FDFDFD; 14 | margin: 10px; 15 | overflow: hidden; 16 | border: 1px solid #F1F2F4; 17 | } 18 | .ecode .show{ 19 | margin-top: 30px; 20 | height: 100%; 21 | float: left; 22 | position: relative; 23 | overflow:auto; 24 | width: 100%; 25 | padding: 1px; 26 | padding-bottom: 10px; 27 | } 28 | .ecode table,.ecode p,.ecode ul,.ecode li,.ecode .function,.ecode .assembly{ 29 | position: relative; 30 | float: left; 31 | clear: left; 32 | display: block; 33 | list-style: none; 34 | } 35 | .ecode .function{ 36 | margin-bottom: 10px; 37 | } 38 | .ecode table td,.ecode table th{ 39 | text-align: left; 40 | border-right: 1px solid; 41 | border-bottom: 1px solid; 42 | padding: 2px 3px; 43 | border-color: #888888; 44 | } 45 | .ecode table td{ 46 | background-color: #fff; 47 | } 48 | .ecode table{ 49 | border-left: 1px solid; 50 | border-top: 1px solid; 51 | border-collapse: separate; 52 | border-spacing: 0px; 53 | border-color: #888888; 54 | white-space:nowrap; overflow:hidden; text-overflow:ellipsis; 55 | } 56 | .ecode .show div{ 57 | clear: left; 58 | float: left; 59 | margin-left: 10px; 60 | margin-bottom: 10px; 61 | } 62 | .ecode .show div:first-child{ 63 | margin-top: 10px; 64 | } 65 | .ecode .function_table{ 66 | margin-bottom: 4px; 67 | } 68 | .ecode .variable_table{ 69 | margin-bottom: 4px; 70 | } 71 | .ecode .assembly_table{ 72 | margin-bottom: 8px; 73 | } 74 | .ecode ul{ 75 | padding-left: 22px; 76 | position: relative; 77 | float: left; 78 | } 79 | .ecode ul li{ 80 | margin-left: 0px; 81 | float: left; 82 | position: relative; 83 | display: block; 84 | } 85 | .ecode span{ 86 | position: relative; 87 | float: left; 88 | display: block; 89 | } 90 | .ecode p{ 91 | position: relative; 92 | line-height: 20px; 93 | float: left; 94 | display: block; 95 | clear: both; 96 | white-space:nowrap; text-overflow:ellipsis; 97 | } 98 | .ecode .line1{ 99 | width: 15px; 100 | border-style: dashed; 101 | border-color: #808080; 102 | border-left-width:1px; 103 | border-top-width:1px; 104 | border-right-width:0px; 105 | border-bottom-width:1px; 106 | left: 2px; 107 | top:10px; 108 | position: absolute; 109 | } 110 | .ecode .judgeChild{ 111 | position: relative; 112 | overflow: visible; 113 | float: left; 114 | } 115 | .ecode .judgeChild .line2{ 116 | border-left-width:0px; 117 | } 118 | .ecode .line2{ 119 | height: 100%; 120 | width: 10px; 121 | border-style: dashed; 122 | border-color: #808080; 123 | border-left-width:1px; 124 | border-top-width:1px; 125 | border-right-width:0px; 126 | border-bottom-width:0px; 127 | display: none; 128 | top:10px; 129 | left: 8px; 130 | position: absolute; 131 | } 132 | .ecode .line3{ 133 | height: 100%; 134 | width: 32px; 135 | left: -1px; 136 | border-style: dashed; 137 | border-color: #808080; 138 | border-left-width:0px; 139 | border-top-width:0px; 140 | border-right-width:0px; 141 | border-bottom-width:1px; 142 | display: none; 143 | position: absolute; 144 | } 145 | .ecode .line4{ 146 | height: 100%; 147 | width: 32px; 148 | top: -1px; 149 | left: -1px; 150 | border-style: dashed; 151 | border-color: #808080; 152 | border-left-width:0px; 153 | border-top-width:1px; 154 | border-right-width:0px; 155 | border-bottom-width:0px; 156 | display: none; 157 | position: absolute; 158 | } 159 | .ecode .triangle-right { 160 | width: 0; 161 | height: 0; 162 | border-top: 4px solid transparent; 163 | border-left:5px solid #808080; 164 | border-bottom: 4px solid transparent; 165 | position: absolute; 166 | right: -2px; 167 | display: none; 168 | } 169 | .ecode .triangle-down { 170 | width: 0; 171 | height: 0; 172 | border-top: 5px solid #808080; 173 | border-left: 4px solid transparent; 174 | border-right: 4px solid transparent; 175 | position: absolute; 176 | bottom: -2px; 177 | left: -4px; 178 | display: none; 179 | } 180 | .ecode .close{ 181 | width: 0px; 182 | height: 0px; 183 | overflow: hidden; 184 | float: left; 185 | } 186 | .ecode .def{ 187 | width: 0px; 188 | height: 0px; 189 | overflow: hidden; 190 | float: left; 191 | 192 | } 193 | .ecode .ifTrueClose{ 194 | overflow: hidden; 195 | padding: 0px; 196 | height: 0px; 197 | } 198 | .ecode .assembly div{ 199 | margin-left: 0px; 200 | } 201 | .ecode .assembly_table tr:nth-child(2) td:first-child{ 202 | color:#000080; 203 | } 204 | .ecode .function_table tr:nth-child(2) td:first-child{ 205 | color:#000080; 206 | } 207 | .ecode .sysCommand{ 208 | color:#0000FF 209 | } 210 | .ecode .bracket0{ 211 | color:#000080; 212 | padding: 0px 2px; 213 | } 214 | .ecode .bracket1{ 215 | color:#000080; 216 | padding: 0px 2px; 217 | } 218 | .ecode .bracket2{ 219 | color:#000080; 220 | padding: 0px 2px; 221 | } 222 | .ecode .operator{ 223 | color:#000080; 224 | padding: 0px 2px; 225 | } 226 | .ecode .datetime{ 227 | color:#000080; 228 | padding: 0px 2px; 229 | } 230 | .ecode .math{ 231 | color:#800000 232 | } 233 | .ecode .command{ 234 | color:#800000 235 | } 236 | .ecode .static{ 237 | color:#000080 238 | } 239 | .ecode .quote{ 240 | color:#008080 241 | } 242 | .ecode table th{ 243 | background-color: #E6EDE4; 244 | font-weight: 400; 245 | } 246 | .ecode .dataType{ 247 | color: #0000FF; 248 | } 249 | .ecode .remark{ 250 | color: #008000 251 | } 252 | .ecode .logic{ 253 | color:#000080; 254 | margin-left: 8px; 255 | margin-right: 8px; 256 | } 257 | .ecode .logicStatic{ 258 | color:#000080; 259 | } 260 | .ecode .origiData,.ecode .origiData textarea{ 261 | width: 100%; 262 | height: 100%; 263 | 264 | } 265 | .ecode .origiData textarea{ 266 | padding: 0px; 267 | margin: 0px; 268 | width: 100%; 269 | height: 100%; 270 | border:none; 271 | padding: 1px; 272 | font-size: 12px; 273 | } 274 | .ecode .origiData{ 275 | left: 0px; 276 | top:30px; 277 | position: absolute; 278 | display: none; 279 | width: 100%; 280 | 281 | } 282 | .ecode .controller{ 283 | height:30px; 284 | width: 100%; 285 | background-color: #F1F2F4; 286 | top:0px; 287 | left: 0px; 288 | position: absolute; 289 | 290 | } 291 | .ecode .controller .copy{ 292 | height:30px; 293 | padding: 0px 5px; 294 | color: #fff; 295 | background-color: #45A3E1; 296 | line-height: 30px; 297 | font-size: 12px; 298 | text-decoration: none; 299 | position: absolute; 300 | right: 0px; 301 | top: 0px; 302 | } 303 | .ecode .controller .desc{ 304 | height:30px; 305 | width: 100%; 306 | top:0px; 307 | left: 0px; 308 | position: absolute; 309 | font-size: 14px; 310 | text-indent: 10px; 311 | line-height: 30px; 312 | 313 | } 314 | -------------------------------------------------------------------------------- /ecode.js: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------// 2 | //* Ecode 3.5.10 *// 3 | //* Created by zhangshirong Jarvis *// 4 | //-------------------------------------------------------------// 5 | 6 | var Ecode = { 7 | create: function() { 8 | var ecode={}; 9 | var lastPart=-1; 10 | var doubleCom=[ 11 | [".如果真",".如果真结束"], 12 | [".判断开始",".判断结束"], 13 | [".如果",".如果结束"], 14 | [".判断循环首",".判断循环尾"], 15 | [".变量循环首",".变量循环尾"], 16 | [".计次循环首",".计次循环尾"], 17 | [".循环判断首",".循环判断尾"] 18 | ] 19 | var replaceCommand=[ 20 | {origi:".如果真",replace:"如果真"}, 21 | {origi:".如果真结束",replace:"如果真结束"}, 22 | {origi:".判断开始",replace:"判断"}, 23 | {origi:".判断",replace:"判断"}, 24 | {origi:".默认",replace:"默认"}, 25 | {origi:".判断结束",replace:"判断结束"}, 26 | {origi:".如果",replace:"如果"}, 27 | {origi:".否则",replace:"否则"}, 28 | {origi:".如果结束",replace:"如果结束"}, 29 | {origi:".判断循环首",replace:"判断循环首"}, 30 | {origi:".判断循环尾",replace:"判断循环尾"}, 31 | {origi:".计次循环首",replace:"计次循环首"}, 32 | {origi:".计次循环尾",replace:"计次循环尾"}, 33 | {origi:".变量循环首",replace:"变量循环首"}, 34 | {origi:".变量循环尾",replace:"变量循环尾"}, 35 | {origi:".循环判断首",replace:"循环判断首"}, 36 | {origi:".循环判断尾",replace:"循环判断尾"} 37 | ]; 38 | var sysCom=[ 39 | "返回", 40 | "跳出循环", 41 | "到循环尾", 42 | "结束" 43 | ]; 44 | var sysCom2=[ 45 | "或", 46 | "且" 47 | ]; 48 | var sysSta=[ 49 | "真", 50 | "假" 51 | ] 52 | ecode.trans=function(ele){ //ele如果为空则转换当前所有class为ecode的,ele为指定的即转换指定,同时ele可以为自定义的元素数组 53 | var eleEcode; 54 | if(ele){ 55 | if(ele.length>1){eleEcode=[ele];} 56 | else{eleEcode=ele;} 57 | } 58 | else{ 59 | eleEcode=document.querySelectorAll(".ecode"); 60 | } 61 | for(var a=0;a/g,">"); 69 | eleEcode[a].innerHTML="

Loading...

" 70 | var lineCodes=origiData.split("\n"); 71 | var b; 72 | for(b=0;b0){ 122 | var program=new Array(); 123 | for(var c=limit[b][0];c复制代码
"+html+"
"; 147 | eleEcode[a].innerHTML=allHTML; 148 | var eleOrigiData=eleEcode[a].querySelector(".origiData"); 149 | eleEcode[a].style.height=eleEcode[a].clientHeight+"px"; 150 | eleOrigiData.style.height=eleEcode[a].clientHeight-30+"px"; 151 | var eleEcodeIfTrue=eleEcode[a].querySelectorAll(".ifTrue"); 152 | var eleEcodeCyc=eleEcode[a].querySelectorAll(".cycle"); 153 | var eleEcodeShow=eleEcode[a].querySelector(".show"); 154 | var eleEcodeJudge=eleEcode[a].querySelectorAll(".judge"); 155 | var eleEcodeIf=eleEcode[a].querySelectorAll(".if"); 156 | var eleEcodeUl=eleEcode[a].querySelectorAll("ul"); 157 | eleEcodeShow.style.width=window.screen.availWidth+"px"; 158 | //处理高度////////////////////////////////////// 159 | for(var b=0;b-1)turn3=1; 297 | } 298 | } 299 | var add=turn0*4; 300 | var line1_; 301 | var line2_; 302 | var line3_; 303 | tempData['parent']=parent; 304 | tempData['turn0']=turn0; 305 | tempData['turn1']=turn1; 306 | tempData['turn2']=turn2; 307 | tempData['turn3']=turn3; 308 | tempData['def']=def; 309 | tempData['add']=add; 310 | tempData['all']=all; 311 | judgeValueFixed[judgeValueFixed.length]=tempData; 312 | if(all[0] && all[0]-2==1){ 313 | parent.children[2].style.marginBottom="20px"; 314 | } 315 | for(var c=0;c 0 || parentNext.children[0].className.indexOf("def") > 0)) { 336 | parent.children[close].style.marginBottom = "20px"; 337 | } 338 | } 339 | //如果真预处理////////////////////////////////////// 340 | var ifTrueValueFixed=new Array(); 341 | for(var b=0;b-1)turn3=1; 423 | } 424 | } 425 | var add=turn0*4; 426 | line1.style.top=10+add+"px"; 427 | line1.style.height=parent.children[def].offsetTop-add+"px"; 428 | line1.querySelector(".triangle-right").style.bottom="-5px"; 429 | line1.querySelector(".triangle-right").style.display="block"; 430 | if(turn1){ 431 | line2.querySelector(".triangle-right").style.display="block"; 432 | line2.querySelector(".triangle-right").style.bottom="-5px"; 433 | line2.style.borderBottomWidth="1px"; 434 | if(add==0){ 435 | add=6; 436 | } 437 | line2.style.height=parent.children[close].offsetTop-parent.children[def].offsetTop+20+parent.children[close].offsetHeight+"px"; 438 | line2.style.top=parent.children[def].offsetTop-10+"px"; 439 | line2.style.display="block"; 440 | } 441 | else{ 442 | line2.querySelector(".triangle-down").style.display="block"; 443 | line2.style.height=parent.children[close].offsetTop-parent.children[def].offsetTop+10+parent.children[close].offsetHeight+"px"; 444 | line2.style.top=parent.children[def].offsetTop-10+"px"; 445 | line2.style.display="block"; 446 | } 447 | if(turn2){ 448 | line1.style.borderBottomWidth="0px"; 449 | line1.style.height=line1.clientHeight-6+"px"; 450 | line1.querySelector(".triangle-right").style.left="32px"; 451 | line3.style.display="block"; 452 | } 453 | if(turn3){ 454 | line2.style.borderTopWidth="0px"; 455 | line2.style.height=line2.clientHeight-8+"px"; 456 | line2.style.top=parent.children[def].offsetTop-10+4+"px"; 457 | line4.style.display="block"; 458 | } 459 | 460 | } 461 | //计算判断流程线////////////////////////////////////////// 462 | for(var b=0;b-1){ 504 | line2_.style.top=line1_.offsetHeight+2+"px"; 505 | line2_.style.width="30px"; 506 | } 507 | else{ 508 | line2_.style.top=line1_.offsetHeight-2+"px"; 509 | } 510 | line2_.style.left="-12px"; 511 | line2_.style.borderTopWidth="1px"; 512 | line2_.style.display="block"; 513 | 514 | } 515 | line1.style.top=10+add+"px"; 516 | line1.style.height=parent.children[def].offsetTop-add+"px"; 517 | line1.querySelector(".triangle-right").style.bottom="-5px"; 518 | line1.querySelector(".triangle-right").style.display="block"; 519 | if(all.length){ 520 | line1.style.height=parent.children[all[0]].offsetTop-10+6-add+"px"; 521 | if(turn1){ 522 | line2.querySelector(".triangle-right").style.display="block"; 523 | line2.querySelector(".triangle-right").style.bottom="-5px"; 524 | line2.querySelector(".triangle-right").style.right="-1px"; 525 | line2.style.borderBottomWidth="1px"; 526 | line2.style.height=parent.children[close].offsetTop-parent.children[all[0]].offsetTop+20-6+"px"; 527 | } 528 | else{ 529 | line2.querySelector(".triangle-down").style.display="block"; 530 | line2.style.height=parent.children[close].offsetTop-parent.children[all[0]].offsetTop+20-10-6+"px"; 531 | } 532 | line2.style.top=parent.children[all[0]].offsetTop-10+"px"; 533 | line2.style.display="block"; 534 | if(turn2){ 535 | line1_.style.borderBottomWidth="0px"; 536 | line1_.style.height=line1_.offsetHeight-4+"px"; 537 | line1_.querySelector(".triangle-right").style.left="32px"; 538 | line3_.style.display="block"; 539 | } 540 | if(turn3){ 541 | line2.style.borderTopWidth="0px"; 542 | line2.style.height=line2.clientHeight-2+"px"; 543 | line2.style.top=line2.offsetTop+4+"px"; 544 | line4.style.display="block"; 545 | } 546 | 547 | } 548 | else{ 549 | if(turn1){ 550 | line2.querySelector(".triangle-right").style.display="block"; 551 | line2.querySelector(".triangle-right").style.bottom="-5px"; 552 | line2.style.borderBottomWidth="1px"; 553 | if(add==0){ 554 | add=6; 555 | } 556 | line2.querySelector(".triangle-right").style.right="-1px"; 557 | line2.style.height=parent.children[close].offsetTop-parent.children[def].offsetTop+20-add+parent.children[close].offsetHeight+"px"; 558 | 559 | } 560 | else{ 561 | line2.querySelector(".triangle-down").style.display="block"; 562 | line2.style.height=parent.children[close].offsetTop-parent.children[def].offsetTop+10+parent.children[close].offsetHeight+"px"; 563 | } 564 | line2.style.top=parent.children[def].offsetTop-10+"px"; 565 | line2.style.display="block"; 566 | if(turn2){ 567 | line1.style.borderBottomWidth="0px"; 568 | line1.style.height=line1.clientHeight-6+"px"; 569 | line1.querySelector(".triangle-right").style.left="34px"; 570 | line3.style.display="block"; 571 | } 572 | if(turn3){ 573 | line2.style.borderTopWidth="0px"; 574 | line2.style.height=line2.clientHeight-6+"px"; 575 | line2.style.top=line2.offsetTop+6+"px"; 576 | line4.style.display="block"; 577 | } 578 | } 579 | 580 | } 581 | //计算如果真流程线////////////////////////////////////// 582 | for(var b=0;bquoteMat[a][0]){ 623 | k=a+1; 624 | break; 625 | } 626 | } 627 | return k; 628 | } 629 | function drawn(origiArr){ 630 | var html=""; 631 | var endDivTag=0; 632 | for(var b=0;b"; 637 | if(trim(origiArr[b].parameter[1])=="" && trim(origiArr[b].parameter[2])==""){ 638 | html+=""; 639 | } 640 | else{ 641 | html+="
程序集名保留保留备注
"; 642 | origiArr[b].parameter[1]=""+origiArr[b].parameter[1]+""; 643 | if(origiArr[b].parameter[2].indexOf("公开")>-1){ 644 | origiArr[b].parameter[2]="√"; 645 | } 646 | } 647 | html+=tablePara(4,origiArr[b].parameter); 648 | lastPart=0;//程序集or类 649 | } 650 | else if(origiArr[b].type==".程序集变量"){ 651 | if(lastPart!=0 && lastPart!=0.1){ 652 | html+="
类名基类公开备注
"; 653 | lastPart=0; 654 | } 655 | if(lastPart!=0.1){ 656 | html+=""; 657 | } 658 | for(var c=2;c"; 665 | origiArr[b].parameter[2]=origiArr[b].parameter[2].replace(/"/g,""); 666 | origiArr[b].parameter[3]=""+origiArr[b].parameter[3].replace(/ /g," ")+""; 667 | 668 | html+=tablePara(4,origiArr[b].parameter); 669 | lastPart=0.1;//程序集变量 670 | endDivTag=1; 671 | } 672 | else if(origiArr[b].type==".子程序"){ 673 | if(lastPart!=1){ 674 | if(lastPart<1 && lastPart>-1){ 675 | html+="
程序集名保留保留备注
变量名类型数组备注
"; 676 | } 677 | else if(lastPart>1 && lastPart<=2){ 678 | html+=""; 679 | } 680 | html+="
"; 681 | } 682 | else{ 683 | html+="
子程序名返回值类型公开备注
"; 684 | } 685 | origiArr[b].parameter=dealTablePara(4,origiArr[b].parameter); 686 | origiArr[b].parameter[2]=trim(origiArr[b].parameter[2]); 687 | if(origiArr[b].parameter[2].indexOf("公开")>-1){ 688 | origiArr[b].parameter[2]="√"; 689 | } 690 | origiArr[b].parameter[1]=""+origiArr[b].parameter[1]+""; 691 | origiArr[b].parameter[3]=""+origiArr[b].parameter[3].replace(/ /g," ")+""; 692 | html+=tablePara(4,origiArr[b].parameter,3,3); 693 | lastPart=1;//子程序 694 | endDivTag=1; 695 | } 696 | else if(origiArr[b].type==".参数"){ 697 | if(lastPart==1){ 698 | html+=""; 699 | } 700 | else if(lastPart==3){ 701 | html+=""; 702 | } 703 | origiArr[b].parameter=dealTablePara(4,origiArr[b].parameter); 704 | origiArr[b].parameter[2]=trim(origiArr[b].parameter[2]); 705 | if(lastPart>=3 && lastPart<4){ 706 | var temp=""; 707 | if(origiArr[b].parameter[2].indexOf("传址")>-1){ 708 | temp+="√"; 709 | } 710 | temp+="
子程序名返回值类型公开备注
参数名类型参考可空数组备注
参数名类型传址数组备注
"; 711 | if(origiArr[b].parameter[2].indexOf("数组")>-1){ 712 | temp+="√"; 713 | } 714 | origiArr[b].parameter[2]=temp; 715 | origiArr[b].parameter[1]=""+origiArr[b].parameter[1]+""; 716 | origiArr[b].parameter[3]=""+origiArr[b].parameter[3].replace(/ /g," ")+""; 717 | origiArr[b].parameter[2]=temp; 718 | html+=tablePara(4,origiArr[b].parameter); 719 | lastPart=3.1; 720 | } 721 | else if(lastPart>=1 && lastPart<2){ 722 | var temp=""; 723 | if(origiArr[b].parameter[2].indexOf("参考")>-1){ 724 | temp+="√"; 725 | } 726 | temp+=""; 727 | if(origiArr[b].parameter[2].indexOf("可空")>-1){ 728 | temp+="√"; 729 | } 730 | temp+=""; 731 | if(origiArr[b].parameter[2].indexOf("数组")>-1){ 732 | temp+="√"; 733 | } 734 | origiArr[b].parameter[2]=temp; 735 | origiArr[b].parameter[1]=""+origiArr[b].parameter[1]+""; 736 | origiArr[b].parameter[3]=""+origiArr[b].parameter[3].replace(/ /g," ")+""; 737 | html+=tablePara(4,origiArr[b].parameter); 738 | lastPart=1.1; 739 | } 740 | endDivTag=1; 741 | //子程序参数 1.1 dll参数 3.1 742 | } 743 | else if(origiArr[b].type==".局部变量"){ 744 | if(lastPart!=2){ 745 | html+="
" 746 | html+=""; 747 | } 748 | origiArr[b].parameter=dealTablePara(5,origiArr[b].parameter); 749 | origiArr[b].parameter[2]=trim(origiArr[b].parameter[2]); 750 | origiArr[b].parameter[1]=""+origiArr[b].parameter[1]+""; 751 | origiArr[b].parameter[4]=""+origiArr[b].parameter[4].replace(/ /g," ")+""; 752 | origiArr[b].parameter[3]=origiArr[b].parameter[3].replace(/"/g,""); 753 | if(origiArr[b].parameter[2].indexOf("静态")>-1){ 754 | origiArr[b].parameter[2]="√"; 755 | } 756 | html+=tablePara(5,origiArr[b].parameter); 757 | lastPart=2;//局部变量 758 | endDivTag=1; 759 | } 760 | else if(origiArr[b].type==".DLL命令"){ 761 | if(lastPart!=3){ 762 | if(lastPart>-1)html+="
变量名类型静态数组备注
"; 763 | html+="
"; 764 | } 765 | html+="
"; 766 | origiArr[b].parameter=dealTablePara(6,origiArr[b].parameter); 767 | if(origiArr[b].parameter[4].indexOf("公开")>-1){ 768 | origiArr[b].parameter[4]="√"; 769 | } 770 | html+=""; 771 | html+=""; 772 | html+=""; 773 | html+=""; 774 | html+=""; 775 | lastPart=3;//DLL 776 | endDivTag=1; 777 | } 778 | else if(origiArr[b].type==".常量"){ 779 | if(lastPart!=4){ 780 | if(lastPart>-1)html+="
Dll命令名返回值类型公开备注
"+origiArr[b].parameter[0]+""+origiArr[b].parameter[1]+""+origiArr[b].parameter[4]+""+origiArr[b].parameter[5]+"
库文件名:
"+origiArr[b].parameter[2].replace(/"/g,"")+"
在库中对应命令名:
"+origiArr[b].parameter[3].replace(/"/g,"")+"
"; 781 | html+="
"; 782 | html+="
"; 783 | } 784 | origiArr[b].parameter=dealTablePara(4,origiArr[b].parameter); 785 | var temp=trim(origiArr[b].parameter[1].replace(/"/g,"")); 786 | if(Number(temp)==temp && temp!=""){ 787 | origiArr[b].parameter[1]=""+temp+""; 788 | } 789 | else{ 790 | origiArr[b].parameter[1]=""+origiArr[b].parameter[1].replace(/ /g," ")+""; 791 | } 792 | origiArr[b].parameter[0]=""+origiArr[b].parameter[0]+""; 793 | origiArr[b].parameter[3]=""+origiArr[b].parameter[3].replace(/ /g," ")+""; 794 | if(origiArr[b].parameter[2].indexOf("公开")>-1){ 795 | origiArr[b].parameter[2]="√"; 796 | } 797 | html+=tablePara(4,origiArr[b].parameter); 798 | lastPart=4;//常量 799 | endDivTag=1; 800 | } 801 | else if(origiArr[b].type==".数据类型"){ 802 | if(lastPart!=5){ 803 | if(lastPart>-1)html+="
常量名称常量值公开备注
"; 804 | html+="
"; 805 | html+="
"; 806 | } 807 | origiArr[b].parameter=dealTablePara(4,origiArr[b].parameter); 808 | origiArr[b].parameter[0]=""+origiArr[b].parameter[0]+""; 809 | origiArr[b].parameter[2]=""+origiArr[b].parameter[2].replace(/ /g," ")+""; 810 | if(origiArr[b].parameter[1].indexOf("公开")>-1){ 811 | origiArr[b].parameter[1]="√"; 812 | } 813 | html+=tablePara(3,origiArr[b].parameter,2,3); 814 | lastPart=5;//数据类型 815 | endDivTag=1; 816 | } 817 | else if(origiArr[b].type==".成员"){ 818 | if(lastPart==5){ 819 | html+=""; 820 | } 821 | origiArr[b].parameter=dealTablePara(5,origiArr[b].parameter); 822 | origiArr[b].parameter[1]=""+origiArr[b].parameter[1]+""; 823 | origiArr[b].parameter[4]=""+origiArr[b].parameter[4].replace(/ /g," ")+""; 824 | origiArr[b].parameter[3]=origiArr[b].parameter[3].replace(/"/g,""); 825 | if(origiArr[b].parameter[2].indexOf("传址")>-1){ 826 | origiArr[b].parameter[2]="√"; 827 | } 828 | html+=tablePara(5,origiArr[b].parameter); 829 | lastPart=5.1;//数据类型成员 830 | endDivTag=1; 831 | } 832 | else if(origiArr[b].type==".全局变量"){ 833 | if(lastPart!=6){ 834 | if(lastPart>-1)html+="
数据类型名公开备注
成员名类型传址数组备注
"; 835 | html+="
"; 836 | html+="
"; 837 | } 838 | origiArr[b].parameter=dealTablePara(5,origiArr[b].parameter); 839 | origiArr[b].parameter[4]=""+origiArr[b].parameter[4].replace(/ /g," ")+""; 840 | var temp=origiArr[b].parameter[3]; 841 | origiArr[b].parameter[3]=origiArr[b].parameter[2]; 842 | origiArr[b].parameter[2]=temp; 843 | if(origiArr[b].parameter[3].indexOf("公开")>-1){ 844 | origiArr[b].parameter[3]="√"; 845 | } 846 | origiArr[b].parameter[2]=origiArr[b].parameter[2].replace(/"/g,""); 847 | origiArr[b].parameter[1]=""+origiArr[b].parameter[1]+""; 848 | html+=tablePara(5,origiArr[b].parameter); 849 | lastPart=6;//全局变量 850 | endDivTag=1; 851 | } 852 | else if(origiArr[b].type.substr(0,1)=="."){ 853 | if(lastPart>=0){ 854 | html+="
全局变量名全类型数组公开备注
"; 855 | lastPart=-2; 856 | } 857 | var command=origiArr[b].type; 858 | for(var c=0;c"; 880 | } 881 | else if(b==origiArr.length-1){ 882 | html+="

"+command+parseCodeLine(parameter,1)+"

"; 883 | html+=""; 884 | 885 | } 886 | else{ 887 | html+="
  • "+command+parseCodeLine(parameter,1)+"

  • "; 888 | } 889 | 890 | } 891 | else if(origiArr[b].type=="code"){ 892 | if(lastPart>-1){ 893 | html+=""; 894 | lastPart=-1; 895 | } 896 | var parameter=origiArr[b].parameter; 897 | if(lastPart<-1){ 898 | html+="
  • "+parseCodeLine(parameter,1)+"

  • "; 899 | } 900 | else{ 901 | html+="

    "+parseCodeLine(parameter,1)+"

    "; 902 | } 903 | } 904 | } 905 | else{ 906 | html+=drawn(origiArr[b]); 907 | } 908 | } 909 | if(endDivTag==1){ 910 | if((lastPart >= 3 && lastPart < 4) || (lastPart >= 4 && lastPart < 5) || (lastPart >= 5 && lastPart < 6) || (lastPart >= 6))html+=""; 911 | html+="
    "; 912 | } 913 | return html; 914 | } 915 | function parseCodeLine(origiCodeStr,type){ 916 | var codeStr=trimEnd(origiCodeStr); 917 | if(codeStr=="")return ""; 918 | var str=codeStr; 919 | var add=0; 920 | //var addRemark=0; 921 | if(type){ 922 | //高亮注释///////////////////////////////// 923 | var remark=codeStr.indexOf("'",0); 924 | var quote=findMatchStr("“","”",codeStr); 925 | while(remark>-1){ 926 | if(remark==0)break; 927 | var inQ=inQuote(quote,remark); 928 | if(!inQ){ 929 | break; 930 | } 931 | remark=codeStr.indexOf("'",remark+1); 932 | } 933 | if(remark==-1){ 934 | remark=codeStr.length; 935 | } 936 | else{ 937 | codeStr=codeStr.substr(0,remark)+""+codeStr.substr(remark).replace(/ /g," ")+""; 938 | } 939 | //高亮运算符///////////////////////////////// 940 | add=0; 941 | str=codeStr; 942 | quote=findMatchStr("“","”",codeStr); 943 | var compuStr="\=%<>≠≥≤+-×÷,"; 944 | for(var a=0;a-1){ 949 | var k=inQuote(quote,p); 950 | if(k==0){ 951 | temp=""+temp+""; 952 | codeStr=codeStr.substr(0,add+p)+temp+codeStr.substr(add+p+1); 953 | add+=temp.length-1; 954 | } 955 | } 956 | } 957 | remark+=add; 958 | //高亮引用///////////////////////////////// 959 | add=0; 960 | str=codeStr; 961 | quote=findMatchStr("“","”",codeStr); 962 | for(var a=0;a"; 965 | codeStr=codeStr.substr(0,add+quote[a][0])+rep+codeStr.substr(add+quote[a][1]+1); 966 | add+=rep.length-(quote[a][1]-quote[a][0])-1; 967 | } 968 | } 969 | remark+=add; 970 | //高亮常量///////////////////////////////// 971 | add=0; 972 | quote=findMatchStr("“","”",codeStr); 973 | var statics=codeStr.indexOf("#",0); 974 | while(statics>-1){ 975 | var k=0; 976 | if(statics",statics); 1008 | var p1=codeStr.length; 1009 | for(var b=0;b< p.length;b++){ 1010 | if(p[b]!=-1 && p[b]"; 1015 | codeStr=codeStr.substr(0,statics)+rep+codeStr.substr(p1); 1016 | add+=rep.length-(p1-statics); 1017 | remark+=rep.length-(p1-statics); 1018 | } 1019 | statics=codeStr.indexOf("#",add+statics+1); 1020 | } 1021 | add=0; 1022 | str=codeStr; 1023 | } 1024 | //高亮命令///////////////////////////////// 1025 | var bracket0=findMatchStr("(",")",codeStr,true); 1026 | for(var a=0;aremark){ 1029 | k=1; 1030 | } 1031 | if(k==0){ 1032 | var son=codeStr.substr(bracket0[a][0]+1,bracket0[a][1]-bracket0[a][0]-1); 1033 | son=parseCodeLine(son); 1034 | var lastStart=bracket0[a][0]-1; 1035 | for(var b=lastStart;b>-1;b--){ 1036 | if(codeStr.substr(b,1)!=" "){ 1037 | lastStart=b; 1038 | break; 1039 | } 1040 | } 1041 | var p=new Array(); 1042 | p[p.length]=codeStr.lastIndexOf("+",lastStart); 1043 | p[p.length]=codeStr.lastIndexOf("-",lastStart); 1044 | p[p.length]=codeStr.lastIndexOf("×",lastStart); 1045 | p[p.length]=codeStr.lastIndexOf("÷",lastStart); 1046 | p[p.length]=codeStr.lastIndexOf("%",lastStart); 1047 | p[p.length]=codeStr.lastIndexOf("=",lastStart); 1048 | p[p.length]=codeStr.lastIndexOf("\",lastStart); 1049 | p[p.length]=codeStr.lastIndexOf("<",lastStart); 1050 | p[p.length]=codeStr.lastIndexOf(">",lastStart); 1051 | p[p.length]=codeStr.lastIndexOf(".",lastStart); 1052 | p[p.length]=codeStr.lastIndexOf(",",lastStart); 1053 | p[p.length]=codeStr.lastIndexOf("=",lastStart); 1054 | p[p.length]=codeStr.lastIndexOf("≠",lastStart); 1055 | p[p.length]=codeStr.lastIndexOf("≥",lastStart); 1056 | p[p.length]=codeStr.lastIndexOf("≤",lastStart); 1057 | p[p.length]=codeStr.lastIndexOf(" ",lastStart); 1058 | var p1=-1; 1059 | for(var b=0;b< p.length;b++){ 1060 | if(p[b]!=-1 && p[b]>p1){ 1061 | p1=p[b]; 1062 | } 1063 | } 1064 | var command=codeStr.substr(p1+1,bracket0[a][0]-p1-1); 1065 | var m=0 1066 | for(var e=0;e"; 1074 | } 1075 | else{ 1076 | var rep=""+trim(command)+""; 1077 | } 1078 | str=str.substr(0,add+p1+1)+rep+str.substr(add+bracket0[a][0],1)+son+codeStr.substr(bracket0[a][1]); 1079 | var len=rep.length-command.length+son.length-(bracket0[a][1]-bracket0[a][0])+1; 1080 | add+=len; 1081 | remark+=len; 1082 | } 1083 | } 1084 | if(type){ 1085 | //高亮括号样式///////////////////////////////// 1086 | add=0; 1087 | codeStr=str; 1088 | quote=findMatchStr("“","”",codeStr); 1089 | var compuStr="(){}[]"; 1090 | var last=[-1,-1,-1]; 1091 | for(var a=0;a<=remark;a++){ 1092 | var p=a; 1093 | var temp=str.substr(p,1); 1094 | if(compuStr.indexOf(temp)>-1){ 1095 | var k=inQuote(quote,p); 1096 | if(k==0){ 1097 | var replace=0; 1098 | if(temp=="(" || temp==")"){ 1099 | temp=""+temp; 1100 | } 1101 | else if(temp=="[" || temp=="]"){ 1102 | var temp_=temp; 1103 | if(temp=="]" && last[2]>-1){ 1104 | var strDate=codeStr.substr(last[2],a+add-last[2]); 1105 | if(strDate.match(/^[\d]{4}年([\d]?[\d]{1}月)?([\d]?[\d]{1}日)?([\d]?[\d]{1}时)?([\d]?[\d]{1}分)?([\d]?[\d]{1}秒)?$/g)){ 1106 | 1107 | temp=""+strDate+""+temp; 1108 | replace=1; 1109 | } 1110 | last[2]=-1; 1111 | } 1112 | 1113 | if(replace==0){ 1114 | temp=""+temp; 1115 | } 1116 | if(temp_=="["){ 1117 | last[2]=a; 1118 | } 1119 | } 1120 | else if(temp=="{" || temp=="}"){ 1121 | temp=""+temp; 1122 | } 1123 | 1124 | temp+=""; 1125 | if(last[2]>-1){ 1126 | last[2]+=add+temp.length; 1127 | } 1128 | if(replace==1){ 1129 | codeStr=codeStr.substr(0,add+p-strDate.length)+temp+codeStr.substr(add+p+1); 1130 | add+=temp.length-1-strDate.length; 1131 | } 1132 | else{ 1133 | codeStr=codeStr.substr(0,add+p)+temp+codeStr.substr(add+p+1); 1134 | add+=temp.length-1; 1135 | } 1136 | } 1137 | } 1138 | } 1139 | remark+=add; 1140 | //高亮数字///////////////////////////////// 1141 | str=codeStr; 1142 | add=0; 1143 | quote=findMatchStr("“","”",codeStr); 1144 | var p=codeStr.indexOf(""); 1145 | var p_=codeStr.indexOf("-1){ 1147 | rep=trim(codeStr.substr(0,p_)); 1148 | if(rep!=""){ 1149 | var temp=rep.split(" "); 1150 | var rep_=""; 1151 | for(var c=0;c-1){ 1155 | temp_=temp[c].substr(0,sp); 1156 | } 1157 | for(var d=0;d"; 1160 | } 1161 | } 1162 | for(var d=0;d"; 1165 | } 1166 | } 1167 | rep_+=" "+temp_; 1168 | } 1169 | if(temp.length==0){ 1170 | rep_=rep; 1171 | } 1172 | if(trim(rep_)){ 1173 | rep=""+rep_+""; 1174 | } 1175 | else{ 1176 | rep=""; 1177 | } 1178 | str=rep+str.substr(p_); 1179 | add+=rep.length-(p_); 1180 | } 1181 | } 1182 | while(p>-1 && p"; 1190 | } 1191 | else{ 1192 | var temp=rep.split(" "); 1193 | var rep_=""; 1194 | for(var c=0;c-1){ 1198 | temp_=temp[c].substr(0,sp); 1199 | } 1200 | for(var d=0;d"; 1203 | } 1204 | } 1205 | for(var d=0;d"; 1208 | } 1209 | } 1210 | rep_+=" "+temp_; 1211 | } 1212 | if(temp.length==0){ 1213 | rep_=rep; 1214 | } 1215 | if(trim(rep_)){ 1216 | rep=""+rep_+""; 1217 | } 1218 | else{ 1219 | rep_=""; 1220 | } 1221 | } 1222 | str=str.substr(0,add+p+7)+rep+str.substr(add+p2); 1223 | add+=rep.length-(p2-p-7); 1224 | } 1225 | p=codeStr.indexOf("",p+1); 1226 | } 1227 | remark+=add; 1228 | } 1229 | return str; 1230 | } 1231 | function dealTablePara(cols,origiArr){ 1232 | var arr=new Array(); 1233 | var keep=""; 1234 | var keepStop=1; 1235 | for(var c=origiArr.length;c1){ 1251 | arr[arr.length]=origiArr[c]; 1252 | keep=""; 1253 | keepStop=1; 1254 | } 1255 | else{ 1256 | if(keepStop==0){ 1257 | keep+=","; 1258 | } 1259 | keep+=origiArr[c]; 1260 | if(keepStop==0){ 1261 | arr[arr.length]=keep; 1262 | keep=""; 1263 | keepStop=1; 1264 | } 1265 | else{ 1266 | keepStop=0; 1267 | } 1268 | } 1269 | } 1270 | } 1271 | if(keep!=""){ 1272 | arr[arr.length]=keep; 1273 | } 1274 | if(arr.length>cols){ 1275 | for(var c=cols;c"; 1299 | return temp; 1300 | } 1301 | function matchRe(origiArr){ 1302 | var limit=new Array(); 1303 | var temp0=new Array(); 1304 | var last=-1 1305 | for(var a=0;alast) { 1307 | var k=0; 1308 | for(var e=0;e 0) { 1316 | var temp1 = new Array({}); 1317 | for (var c = limit[0][0] + 1; c < limit[0][1]; c++) { 1318 | temp1[temp1.length] = next[c]; 1319 | } 1320 | temp1 = matchRe(temp1); 1321 | temp1[0] = next[limit[0][0]]; 1322 | temp1[temp1.length] = next[limit[0][1]]; 1323 | temp0[temp0.length] = temp1; 1324 | last=a+limit[0][1]; 1325 | } 1326 | k=1; 1327 | break; 1328 | } 1329 | } 1330 | if(k==0){ 1331 | temp0[temp0.length] = origiArr[a]; 1332 | } 1333 | } 1334 | } 1335 | return temp0; 1336 | } 1337 | function findMatchStr(startStr,endStr,origiStr,quote){ 1338 | var temp0=new Array(); 1339 | var temp1=new Array(); 1340 | var half=new Array(); 1341 | var end=-1; 1342 | var start=origiStr.indexOf(startStr); 1343 | if(quote){ 1344 | var p_quote=findMatchStr("“","”",origiStr); 1345 | } 1346 | while(start>-1){ 1347 | var k=[0,0]; 1348 | end=origiStr.indexOf(endStr,start+1); 1349 | if(p_quote){ 1350 | for(var a=0;ap_quote[a][0]){ 1352 | k[0]=1; 1353 | start=origiStr.indexOf(startStr,start+1); 1354 | end=origiStr.indexOf(endStr,start+1); 1355 | } 1356 | if(endp_quote[a][0]){ 1357 | k[1]=1; 1358 | end=origiStr.indexOf(endStr,end+1); 1359 | } 1360 | } 1361 | } 1362 | var p=origiStr.indexOf(startStr,start+1); 1363 | if(p==-1){ 1364 | p=origiStr.length; 1365 | } 1366 | temp1=new Array(); 1367 | if(p>end){ 1368 | temp1=[start,end]; 1369 | var pp=half.length-1; 1370 | for(var a=pp;a>=0;a--){ 1371 | end=origiStr.indexOf(endStr,end+1); 1372 | if(end-1){ 1395 | temp1[1]=origiStr.indexOf(startStr,temp1[0]+1); 1396 | temp0[temp0.length]=temp1; 1397 | } 1398 | var tempRe=new Array(); 1399 | var last=-1; 1400 | for(var a=0;alast){ 1402 | tempRe[tempRe.length]=temp0[a]; 1403 | last=temp0[a][1]; 1404 | } 1405 | } 1406 | return tempRe; 1407 | 1408 | } 1409 | function findMatchArr(startStr,endStr,origiArr){ 1410 | var temp0=new Array(); 1411 | var start=-1; 1412 | var half=new Array(); 1413 | var end=-1; 1414 | for(var a=0;a0){ 1433 | temp0[half[half.length-1]][1]=end; 1434 | half.length--; 1435 | } 1436 | } 1437 | } 1438 | if(endStr=="") { 1439 | if (start != -1 && end == -1) { 1440 | end = origiArr.length - 1; 1441 | var temp = [start, end]; 1442 | temp0[temp0.length] = temp.concat(); 1443 | } 1444 | } 1445 | var tempRe=new Array(); 1446 | var last=-1; 1447 | for(var a=0;alast){ 1449 | tempRe[tempRe.length]=temp0[a]; 1450 | last=temp0[a][1]; 1451 | } 1452 | } 1453 | return tempRe; 1454 | } 1455 | function trim(str){ //删首尾空 1456 | return str.replace(/(^\s*)|(\s*$)/g, ""); 1457 | } 1458 | function trimEnd(str){ //删尾空 1459 | return str.replace(/(\s*$)/g, ""); 1460 | } 1461 | return ecode; 1462 | } 1463 | } 1464 | function EcodeCopyCode(a){ 1465 | var eleP=a.parentElement.parentElement; 1466 | if(eleP.querySelector(".origiData").style.display=="block"){ 1467 | eleP.querySelector(".origiData").style.display="none"; 1468 | a.innerHTML="复制代码"; 1469 | } 1470 | else{ 1471 | eleP.querySelector(".origiData").style.display="block"; 1472 | a.innerHTML="恢复视图"; 1473 | } 1474 | } 1475 | function EcodeSetCode(ele,data){ 1476 | ele.innerHTML=data; 1477 | ele.setAttribute("status",""); 1478 | } 1479 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 易语言代码框Ecode3.5.10在线测试 6 | 7 | 8 | 9 | 10 | 11 | 12 | 44 | 45 | 46 | 49 |
    50 |

    更新说明 >

    51 |
    52 |

    Verson 3.5.10

    53 |

    1、删除存在的多余html标签

    54 |

    2、备注对","的修复

    55 |

    Verson 3.5.9

    56 |

    1、修复命令在字符串有括号情况下高亮错误

    57 |

    2、增加代码高亮对日期时间型的支持

    58 |

    Verson 3.5.8

    59 |

    1、修复类模块识别为程序集的问题

    60 |

    Verson 3.5.7

    61 |

    1、修复改善流程线

    62 |

    Verson 3.5.6

    63 |

    1、修复部分多维数组导致错误

    64 |

    Verson 3.5.5

    65 |

    1、修复 且 和 或 显示错误

    66 |

    2、修复当代码过长流程线显示错误

    67 |

    Verson 3.5.4

    68 |

    1、修复部分备注错乱

    69 |

    2、修复多个子程序不能完全显示

    70 |

    3、修复判断嵌套流程线错位

    71 |

    Verson 3.5.3

    72 |

    1、修复DLL公开勾符号

    73 |

    2、修复单个判断流程线js报错

    74 |

    3、修复备注高亮错误

    75 |

    4、修复判断嵌套错误

    76 |

    5、修复如果真流程线某些情况下出现过长

    77 |

    6、修复命令嵌套未高亮

    78 |

    7、改进流程线,更接近易语言原版IDE

    79 |

    Verson 3.5.1

    80 |

    1、修复表格备注半角引号后内容不显示

    81 |

    Verson 3.5

    82 |

    1、修复如果真流程线不一致

    83 |

    2、修复部分注释代码内容被高亮

    84 |

    3、添加且&或,真&假

    85 |

    4、修复命令高亮的bug

    86 |

    Verson 3.4 (3.0的流程线部分推倒重做了)

    87 |

    1、修复若干bug

    88 |

    2、改进流程线

    89 |

    Verson 3.0

    90 |

    1、此版本为重写版本,与上一个版本不通用( 废弃 ),推荐用此版本

    91 |

    2、添加流程线小箭头

    92 |

    3、重写转换后的html结构,便于自定义样式、进行外部js修改简单

    93 |

    4、无需像上版本需要特定格式的id名

    94 |

    5、支持全局转换、指定元素单个转换以及自定义目标元素数组转换

    95 |

    6、容错性提高,支持程序集代码、dll代码等多个部分同时存在的情况,建议还是分开放置

    96 |

    7、优化操作部分

    97 |

    8、提高兼容性

    98 | 99 |

    兼容性说明

    100 |
    101 |

    (1) 支持 Chrome

    102 |

    (2) 支持 Firefox

    103 |

    (3) 支持 Safari

    104 |

    (4) 支持 IE 8+

    105 |
    106 |

    使用说明

    107 |
    108 |

    (1) 引入ecode.css & ecode.js( 可以自行下载,也可以直接从本站引用 )

    109 |

    (2) 创建Ecode对象

    110 |

    (3) 使用对象的trans方法

    111 |

    PS:使用方法请参考本页面代码,此版本为UTF-8版本,如需其他编码格式请自行转码

    112 |
    113 |
    114 |
    115 |
    116 |
    117 | 202 | 绘制代码 203 |
    204 |
    205 |
    206 | 207 |
    .版本 2 208 | .DLL命令 GetProcAddress, 整数型, "kernel32", "GetProcAddress", 公开, 返回函数地址 成功返回DLL库模块内函数地址 209 | .参数 DLL句柄, 整数型, , DLL库模块的句柄,可以调用 LoadLibrary 函数返回。 210 | .参数 DLL库模块内函数名, 文本型, , DLL库模块内函数名 211 | 212 | .DLL命令 VirtualQueryEx, 整数型, "kernel32", "VirtualQueryEx" 213 | .参数 hProcess, 整数型, , 对象的进程句柄,可以使用函数 OpenProcess() 返回。 214 | .参数 lpAddress, 整数型, , 对象指针地址 215 | .参数 lpBuffer, 虚拟信息, 传址, 返回的虚拟信息 216 | .参数 dwLength, 整数型, 数组, 信息长度,已知 28 217 | 218 |
    219 |
    .版本 2 220 | 221 | .数据类型 虚拟信息, , MEMORY_BASIC_INFORMATION 222 | .成员 BaseAddress, 整数型, 传址, "5", lpAddress所在页面的基地址 223 | .成员 AllocationBase, 整数型, , "444", 用VirtualAlloc函数分配此页面时的基地址,可以小于等于BaseAddress 224 | .成员 AllocationProtect, 整数型, , , 分配时的保护属性,比如只读、读写、可执行等 225 | .成员 RegionSize, 整数型 226 | .成员 State, 整数型, , , 现在的保护属性 227 | .成员 Protect, 整数型, , , 可以取MEM_COMMIT,MEM_FREE,MEMRESERVE三者之一,其中只有MEM_COMMIT状态的页面是实际分配了物理内存的可以访问 228 | .成员 lType, 整数型, , , 描述有关页面共享的属性 229 |
    230 |
    .版本 2 231 | 232 | .常量 PAGE_READWRITE, "4" 233 | .常量 PAGE_EXECUTE_READWRITE, "64" 234 | .常量 PAGE_EXECUTE_READ, "32" 235 | .常量 HKEY_CLASSES_ROOT, "(( HKEY ) (ULONG_PTR)((LONG)0x80000000) )", , (( HKEY ) (ULONG_PTR)((LONG)0x80000000) ) 236 | .常量 HKEY_CURRENT_CONFIG, "(( HKEY ) (ULONG_PTR)((LONG)0x80000005) )", , (( HKEY ) (ULONG_PTR)((LONG)0x80000005) ) 237 | .常量 HKEY_CURRENT_USER, "(( HKEY ) (ULONG_PTR)((LONG)0x80000001) )", , (( HKEY ) (ULONG_PTR)((LONG)0x80000001) ) 238 | .常量 WH_GETMESSAGE, "3" 239 | 240 |
    241 |
    242 | .版本 2 243 | .支持库 iext 244 | 245 | .全局变量 当前用户id, user_infomation 246 | .全局变量 编号, 整数型, , "5", 1报价单 2订单 3GDKFD 4银行 5现金 247 | .全局变量 当前单据, 整数型 248 | .全局变量 当前单据_超级列表框, 超级列表框 249 | .全局变量 下达编号_工单, 整数型, 公开 250 | 251 |
    252 | 253 |
    © 2014-2018 254 | zhangshirong-Jarvis
    255 | 256 | 257 | 266 |
    267 | --------------------------------------------------------------------------------