IndentationCalculator
Provides stateless utility methods for indentation calculations and analysis. This class contains pure functions that compute indentation-related values without maintaining any state. All methods are static and can be used independently without creating an instance. Typical operations include: - Computing indentation from preceding elements - Analyzing indentation context for enforcement - Creating standard indentation blocks - Extracting indentation from token sequences
See also
for stateful indentation management
Functions
Link copied to clipboard
open fun analyzeEnforcingContext(nodeText: NodeText, index: Int): IndentationCalculator.EnforcingContext
Analyzes the indentation enforcement context at a given position in the node text.
Link copied to clipboard
Computes the indentation that should be used based on the elements preceding the current position.
Link copied to clipboard
Creates a single indentation block of STANDARD_INDENTATION_SIZE spaces.
Link copied to clipboard
Applies indentation enforcement at the specified position, preserving the specified number of characters.
Link copied to clipboard
Extracts the indentation portion from a list of elements.
Link copied to clipboard
Removes excess indentation characters from the node text.