Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

函数注释:提取函数参数-求助正则大佬 #58

Closed
OBKoro1 opened this issue Jun 20, 2019 · 1 comment
Closed

函数注释:提取函数参数-求助正则大佬 #58

OBKoro1 opened this issue Jun 20, 2019 · 1 comment

Comments

@OBKoro1
Copy link
Owner

OBKoro1 commented Jun 20, 2019

取出下列字符串中的param,下面是一些注意事项以及思路

  1. 这里的param可能是a 、b、c所以不能用param字符串来取
  2. 下面是函数参数(参数们...)的字符串,所以空格之类的,可能有也可能没有。
  3. 下面包括了TS的函数参数写法,函数默认参数,甚至还有可能是解构参数(这个可以先不考虑)
  4. 之前考虑过把=后面的字符删掉,然后取前面的param,然后这块也没做出来。
'param6 = test(1,2),param7=[1,2],param8={a:1,b:2},param1: number, param2: string, param10?: string, ...param4'

PS:

  1. 提取函数参数,列出函数参数,用于函数注释这块的相关内容。
  2. 卡了好几天,也没写出来,心态炸了,没有大佬做出来,那我过段时间再回头来看看。
@OBKoro1 OBKoro1 changed the title 函数注释功能开发-求助正则大佬 函数注释:提取函数参数-求助正则大佬 Jun 20, 2019
@OBKoro1
Copy link
Owner Author

OBKoro1 commented Aug 8, 2019

插件:Doxygen Documentation Generator,做函数注释做的很棒,推荐使用该插件。

@OBKoro1 OBKoro1 closed this as completed Aug 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant