Skip to main content

Module trivia

Module trivia 

Source
Expand description

Trivia (whitespace and comments) representation. Token stream and trivia utilities for the parser. Trivia tokens (whitespace/comments/POD) used for formatting and diagnostics. Trivia (comments and whitespace) handling for the Perl parser

This module provides support for preserving comments and whitespace in the AST, which is essential for code formatting and refactoring tools.

Structs§

NodeWithTrivia
A node with attached trivia
TriviaLexer
A lexer wrapper that preserves trivia.
TriviaPreservingParser
Parser that preserves trivia.
TriviaToken
A trivia token with position information

Enums§

Trivia
Trivia represents non-semantic tokens like comments and whitespace

Traits§

TriviaCollector
Extension trait for collecting trivia.