勤
勤
https://echarts.apache.org/en/option.html#grid
其实一个解析器就可以,然后每种语言都需要配置一下,可以参考下 vscode,comment 通常分为单行注释和多行注释,只要分别处理下就可以。 https://github.com/microsoft/vscode/blob/5578eadf868dfa0674d976b141a7ca3674a101da/extensions/javascript/javascript-language-configuration.json#L2-L5 https://github.com/microsoft/vscode/blob/master/extensions/python/language-configuration.json#L2-L5 https://github.com/microsoft/vscode/blob/master/extensions/go/language-configuration.json#L2-L5
我不会 `js` /(ㄒoㄒ)/~~
你可以看看词法解析器这种东西,这样更复杂的东西也可以做了,比如 https://github.com/jimbojw/jslex 或 https://github.com/royswastik/lexical-analyzer 以及,如果强行逐行解析的话,要注意这种 `hello = "this is // stirng"` 这种里面没有注释
1.4.1 确实实现了 comments,但我貌似发现了2个bug - code 数据里面包含了 blank - 我在 Windows 上新增1个空行(换行符为LF),但blank和code结果都+2 - 新增一行代码,blank +1, code+2
http://www.kuqin.com/
http://www.w2bc.com/
http://bbs.ruoren.com/
http://www.th7.cn/
http://www.open-open.com/