Like Lean.Syntax.updateLeading, but preserves the starting position of the syntax if it
exists (instead of setting it to 0). See the docstring of updateLeading for more details.
Instances For
Like Lean.TSyntax.updateLeading, but preserves the starting position of the syntax if it
exists (instead of setting it to 0). See the docstring of updateLeading for more details.
Instances For
Gets the leading whitespace of .original SourceInfo, or none if not .original.
Instances For
Gets the leading whitespace of .original SourceInfo, or the empty substring if not
.original.
Instances For
Gets the trailing whitespace of .original SourceInfo, or the empty substring if not
.original.
Instances For
Clear the leading whitespace of the given syntax if the head SourceInfo is .original, and
otherwise leave it unchanged. See Syntax.unsetTrailing for removing trailing whitespace.
Instances For
Get the start position of the leading whitespace of .original SourceInfo, or none if it
is not .original.
Instances For
Get the start position of the leading whitespace of .original SourceInfo, or the start
position of .synthetic SourceInfo (and none otherwise).
If canonicalOnly := false (the default), also returns none on non-canonical .synthetic
SourceInfo.
Instances For
Get the start position of the leading whitespace of the Syntax if it is original, or the
start position if synthetic (and none otherwise).
If canonicalOnly := false (the default), also returns none on non-canonical synthetic Syntax.