[][src]Module todo_finder_lib::parser::source

Structs

ParsedTodo

A structure to conveniently hold a fully parsed todo.

ParserConfigLookup
TodoParserConfig

A todo parser configuration.

Functions

assignee

Eat an assigned name.

comment_start

Eat a single or multi line comment start.

multi_line_todo

Eat a todo that lives in a multi-line comment block.

parse_todo

Configures a parser to eat a todo from the input.

parse_todos

Using the given config, return a parser that will parse any and all todos from the string.

sentence_and_terminator

Eat a sentence and its terminator and a space. Terminators must have an empty space after them to be considered valid, otherwise they could be a programming operator. The entire eaten sentence and terminators will be returned in a Vector of slices.

single_line_comment

Eat a single line comment. Fails if it hits a possible todo and stops when it eats the end of a line.

single_line_todo

Eat a todo comprised of single line comments. Returns an assignee if possible, the todo's title and a vector of description lines.

title_and_rest_till_eol

Eat a sentence and the rest of the line, if possible. The rest, in the case of a todo, is a portion of the description.

todo_tag

Eat a todo tag. Currently supports TODO, FIXME and @todo. It will also eat any assigned name following the todo tag and return it.

trim_borders

Trim any source code borders off of the string. This only accounts for borders on the beginning and end of the string, not in the middle. To remove borders from the middle of a string, first break it into lines. Furthermore this function will remove trailing whitespace, including line breaks.