MCPcopy
hub / github.com/purpleidea/mgmt / StmtComment

Struct StmtComment

lang/ast/structs.go:7326–7330  ·  view source on GitHub ↗

StmtComment is a representation of a comment. It is currently unused. It probably makes sense to make a third kind of Node (not a Stmt or an Expr) so that comments can still be part of the AST (for eventual automatic code formatting) but so that they can exist anywhere in the code. Currently these a

Source from the content-addressed store, hash-verified

7324// formatting) but so that they can exist anywhere in the code. Currently these
7325// are dropped by the lexer.
7326type StmtComment struct {
7327 interfaces.Textarea
7328
7329 Value string
7330}
7331
7332// String returns a short representation of this statement.
7333func (obj *StmtComment) String() string {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected