Documentation
¶
Overview ¶
Package parser parses Spice annotations embedded in valid Go comments.
@NamedInterface("parser")
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsLegacyImportError ¶
IsLegacyImportError reports whether parsing found the retired import spelling. Callers use this to attach the hard-cut diagnostic and exact replacement without accepting the old directive.
func ParseComment ¶
func ParseComment(input string, position token.Position) (annotation.Annotation, bool, error)
ParseComment parses a single comment line. The bool reports whether the line contains a Spice annotation. Both "//@Name" and "// @Name" are accepted.
func ParseImportComment ¶
func ParseImportComment( input string, position token.Position, ) (annotation.ImportDirective, bool, error)
ParseImportComment parses one file-scoped annotation import declaration. The bool distinguishes ordinary comments from malformed import declarations.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.