> For the complete documentation index, see [llms.txt](https://furesoft.gitbook.io/silverfly/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://furesoft.gitbook.io/silverfly/basics/lexer/markdown/images-and-media.md).

# IgnoreMatcher

An ignore matcher tells the lexer to ignore characters. If you have a language that don't rely on whitespaces you can ignore them or you can use an ignore matcher to allow comments in the code.

The parser is glued by all of the above components and it has some helper methods to make it easier to glue them together.

#### Predefined

To ignore comments you can use one of the predefined IgnoreMatchers. The `MultiLineCommentIgnoreMatcher` can ignore characters in multiple lines and the `SingleLineCommentIgnoreMatcher` ignores comments for a single line. The SingleLineCommentIgnoreMatcher is a special configured MultilineCommentIgnoreMatcher that matches until the line end.

| Method           | Description                                                  | Example                  |
| ---------------- | ------------------------------------------------------------ | ------------------------ |
| Ignore           | Skips character by specification, predicate or IgnoreMatcher | lexer.Ignore("\t")       |
| IgnoreWhitespace | Ignores all whitespaces                                      | lexer.IgnoreWhitespace() |

#### Building your own custom IgnoreMatcher

An IgnoreMatcher is responsible for advancing the cursor in the lexer based on certain conditions. You can build your own by implementing the `IIgnoreMatcher` interface.
