Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CStyleCommentOptions *lege.ParseOptions = &lege.ParseOptions{ Boundaries: []lege.Boundary{ { Start: "//", End: "\n", }, { Start: "/*", End: "*/", }, }, }
CStyleCommentOptions ...
View Source
var HashStyleCommentOptions *lege.ParseOptions = &lege.ParseOptions{ Boundaries: []lege.Boundary{ { Start: "#", End: "\n", }, }, }
HashStyleCommentOptions ...
View Source
var LanguageParseOptions map[Language]*lege.ParseOptions = map[Language]*lege.ParseOptions{ "Go": CStyleCommentOptions, "Java": CStyleCommentOptions, "C": CStyleCommentOptions, "C++": CStyleCommentOptions, "C#": CStyleCommentOptions, "JavaScript": CStyleCommentOptions, "Python": HashStyleCommentOptions, "Ruby": HashStyleCommentOptions, "PHP": {Boundaries: append(CStyleCommentOptions.Boundaries, HashStyleCommentOptions.Boundaries...)}, "Shell": HashStyleCommentOptions, "Visual Basic": {Boundaries: []lege.Boundary{{Start: "'", End: "\n"}}}, "TypeScript": CStyleCommentOptions, "Objective-C": CStyleCommentOptions, "Groovy": CStyleCommentOptions, "Swift": CStyleCommentOptions, "Common Lisp": LispStyleCommentOptions, "Emacs Lisp": LispStyleCommentOptions, "R": HashStyleCommentOptions, "Rust": {Boundaries: []lege.Boundary{{Start: "///", End: "\n"}, {Start: "//!", End: "\n"}, {Start: "//", End: "\n"}}}, "Kotlin": CStyleCommentOptions, "Julia": {Boundaries: []lege.Boundary{{Start: "#=", End: "=#"}, {Start: "#", End: "\n"}}}, "Elixir": HashStyleCommentOptions, }
LanguageParseOptions keeps track of source languages and their corresponding comment options
View Source
var LispStyleCommentOptions *lege.ParseOptions = &lege.ParseOptions{ Boundaries: []lege.Boundary{ { Start: ";", End: "\n", }, }, }
LispStyleCommentOptions ..
Functions ¶
func SearchCommit ¶
SearchCommit searches all files in the tree of a given commit
Types ¶
type Comment ¶
type Comment struct { lege.Collection FilePath string }
Comment represents a comment in a source code file
Click to show internal directories.
Click to hide internal directories.