简体   繁体   English

寻找支持 IntelliSense(.js +.ts 文件)的 js 解析器的开源代码

[英]looking for open source for js parser that support IntelliSense ( .js + .ts files )

do you familiar with any open-source that support.js file + typescript (with some definitions) that parse files + have any API for IntelliSense?您是否熟悉任何支持.js 文件的开源 + typescript(带有一些定义)解析文件 + 有任何用于 IntelliSense 的 API? After the parsing, I want to send parser any member + '.'解析后,我想向解析器发送任何成员+'。 and then get a list of method (like IntelliSense on editor support)?然后获取方法列表(如编辑器支持上的 IntelliSense)?

I want to integrate it and show member list dialog on my editor我想集成它并在我的编辑器上显示成员列表对话框

// exmple : 
class User {
    myTest() {
    alert(this.name);
    }
}

let user = new User();
user.   // I will get here method myTest()

Regards Oren问候奥伦

Sure thing, there is V8 — the JS engine used in Chrome & Node, developed by Google & open sourced.当然,有V8 ——Chrome 和 Node 中使用的 JS 引擎,由 Google 开发并开源。 GitHub mirror is also available. GitHub 镜像也可用。 Documentation .文档

For es6/typescript, typescript language server -https://github.com/sourcegraph/javascript-typescript-langserver For es5, tern js is one library that you can check out - https://ternjs.net/对于 es6/typescript,typescript 语言服务器 -https://github.com/sourcegraph/javascript-typescript-langserver对于 es5,tern js 是一个可以检出的库 - Z5E056C500A1C4B6BADE751://Zternjsnet/07BADE51//00BADE511

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM