Skip to content

Instantly share code, notes, and snippets.

@sokolovstas
Created November 10, 2016 21:03
Show Gist options
  • Save sokolovstas/1a26a806f2b0495733b789be7c24a44b to your computer and use it in GitHub Desktop.
Save sokolovstas/1a26a806f2b0495733b789be7c24a44b to your computer and use it in GitHub Desktop.
--langdef=Go
--langmap=Go:.go
--regex-Go=/func([ \t]+\([^)]+\))?[ \t]+([a-zA-Z0-9_]+)/\2/f,function/
--regex-Go=/var[ \t]+([a-zA-Z_][a-zA-Z0-9_]*)/\1/v,variable/
--regex-Go=/type[ \t]+([a-zA-Z_][a-zA-Z0-9_]*)/\1/t,typedef/
--langdef=Typescript
--langmap=Typescript:.ts
--regex-Typescript=/^[ \t]*(export)?[ \t]*class[ \t]+([a-zA-Z0-9_]+)/\2/c,class/
--regex-Typescript=/^[ \t]*(export)?[ \t]*module[ \t]+([a-zA-Z0-9_]+)/\2/n,module/
--regex-Typescript=/^[ \t]*(export)?[ \t]*function[ \t]+([a-zA-Z0-9_]+)/\2/f,function/
--regex-Typescript=/^[ \t]*export[ \t]+var[ \t]+([a-zA-Z0-9_]+)/\1/v,variable/
--regex-Typescript=/^[ \t]*var[ \t]+([a-zA-Z0-9_]+)[ \t]*=[ \t]*function[ \t]*\(\)/\1/v,varlambda/
--regex-Typescript=/^[ \t]*(export)?[ \t]*(public|private)[ \t]+([a-zA-Z0-9_]+)\(/\3/m,function/
--regex-Typescript=/^[ \t]*(export)?[ \t]*interface[ \t]+([a-zA-Z0-9_]+)/\2/i,interface/
--regex-Typescript=/^[ \t]*(export)?[ \t]*enum[ \t]+([a-zA-Z0-9_]+)/\2/e,enum/
--regex-Typescript=/^[ \t]*(@Component)/\1/g,generics/
--regex-Typescript=/^[ \t]*(template):/\1/g,generics/
--regex-Typescript=/^[ \t]*(styles):/\1/g,generics/
--regex-Typescript=/^[ \t]*(while|if|for|switch|function|([A-Za-z_$][A-Za-z0-9_$]*))\([A-Za-z0-9_$:\{\}<>, \t]*\)/\2/f,function/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment