@baige/jspars
v0.1.2
Published
一个简单的js语法结构解析器,主要用来配合@baige/annotations模块实现注解,可以简单解析语法,函数中的结构不进行解析 引入解析器后,有两个参数,参数1绝对文件路径,参数2(可选)文件内容 执行后返回两个参数data是解析内容,info是对data的简单处理,简单提炼出变量,导入,注解三大集合
Downloads
19
Readme
过滤函数,对象,数组的内部数据解析 过滤label表达式 过滤if whlie for do{}while() 表达式 解析new 表达 解析对象内部数据 解析函数形参 解析链式函数调用 解析解构语法
对应情况 赋值 声明 运行语句 三元表达式 if else while do for () 范围运行语句
bug: 解构语法中间的字段名左右出现空格就会导致解析失败,需要格式化字符串 已解决
修复双注解bug 2022.8.1