Module comments

Module comments 

Source
Expand description

Extract comment spans from parsed SQL files.

Definitions used throughout this crate:

  • leading: a comment that appears on lines immediately preceding a statement/column
  • inline: a comment that appears after code on the same line (ignored)
  • interstitial: a comment inside a statement (ignored)

Structs§

Comment
Structure for containing the CommentKind and the Span for a comment
Comments
Structure for holding all comments found in the document
Location
Represents a line/column location within a source file.
Span
Represents a start/end span (inclusive/exclusive as used by this crate) for a comment in a file.

Enums§

CommentError
Enum for returning errors withe Comment parsing
CommentKind
Enum for holding the comment content, differentiated by single line -- and multiline /* */

Type Aliases§

CommentResult
Alias for comment results that may return a CommentError