docli: Index | Files

package docstring

import ""


Package Files

docstring.go grammar.go

type Argument Uses

type Argument struct {
    Indentation string       `@('\n' (' '|'\t')+)`
    Identifiers []Identifier `@@+`

type Docstring Uses

type Docstring struct {
    Arguments []Argument `(@@|`
    // contains filtered or unexported fields

Docstring is both used as the grammar and the tree representation of the abstract syntactic structure of a doc string.

func Parse Uses

func Parse(s string) Docstring

Parse returns the AST of the given doc string.

func (*Docstring) Identifiers Uses

func (d *Docstring) Identifiers(name string) (identifiers []Identifier)

Identifiers returns all identifiers of an argument if any of them match the given value.

type Identifier Uses

type Identifier struct {
    Name      string `@('-'|Let|Num)+`
    Separator string `@(',' ' ')?`

func (*Identifier) NameAsCamelCase Uses

func (i *Identifier) NameAsCamelCase() string

NameAsCamelCase returns the identifier's name as camel case. TODO(celicoo): improve this.

Package docstring imports 2 packages (graph) and is imported by 1 packages. Updated 2019-10-15. Refresh now. Tools for package owners.