Documentation
¶
Overview ¶
Package parser preserves srcpack's historical parser API while delegating source extraction and cleanup to nexssp/lang.
Index ¶
- func CleanSource(src []byte, opts Options, out *bytes.Buffer)
- func ProcessContent(src string, opts Options) string
- func StripComments(src string) string
- func TrimBlankLines(src string) string
- func TrimIndent(src string) string
- func Truncate(src []byte, opts Options, snippets []string) string
- type Options
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanSource ¶
CleanSource applies source cleanup using the shared language implementation.
func ProcessContent ¶
ProcessContent applies the requested cleanup to full source text.
func StripComments ¶
StripComments removes comments while preserving string literals.
func TrimBlankLines ¶
TrimBlankLines collapses runs of blank lines.
func TrimIndent ¶
TrimIndent removes leading indentation from every line.
Types ¶
Click to show internal directories.
Click to hide internal directories.