Last active
August 11, 2020 03:17
-
-
Save foreversmart/b5c66832d872aee5b44a66b61d1ccbe0 to your computer and use it in GitHub Desktop.
正则替换 type 为 某 package 下的 alias
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// params struct 调整为 common 包的alias | |
type (\w+) struct \{\n([,/|\[\]\s\w\*\(\)\?`:".-]+)\n\} | |
type $1 = common.$1 | |
// params string 调整为 common 包的alias | |
type (\w+) string | |
type $1 = common.$1 | |
// params int 调整为 common 包的alias | |
type (\w+) int | |
type $1 = common.$1 | |
// 字符串枚举类型 调整为 common 包的 alias | |
^\s(\w+)\s+(\w+) = "\w+" | |
type $1 = common.$1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment