随笔分类 -  编译原理

js转语法树,转其他的语言
摘要:/** code 转tokens* *///判断字符function isEqual(test,code,pos,end) { if(pos<end&&code.charCodeAt(pos-1)!==92&&test code.substr(pos,test.length)){ return tr 阅读全文
posted @ 2019-07-09 19:11 无工时代 阅读(363) 评论(0) 推荐(0) 编辑
摘要://js语法树节点类型-babel-eslint9const typeMap= { 'File':function (node) { return [node.program]; }, 'Program':function (node) { return [node.body] }, 'Block' 阅读全文
posted @ 2019-07-07 15:56 无工时代 阅读(871) 评论(0) 推荐(0) 编辑
摘要://js语法树节点类型-babylon@6.18const typeMap= { 'CommentBlock':function (node) {}, 'CommentLine':function (node) {}, 'Literal':function (node) {}, 'Expressio 阅读全文
posted @ 2019-07-06 19:04 无工时代 阅读(837) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示