v / cmd / tools / vdoc / testdata / output_formats / main.md
168 lines · 117 sloc · 2.99 KB · e7905ea841b62effc3aaba5bcc40d4408737945a
Raw

module main

Contents

Constants

const omega = 3 // should be first

[Return to contents]

const alpha = 5 // should be in the middle

[Return to contents]

const beta = 2 // should be at the end

[Return to contents]

abc

fn abc()

abc - should be last

[Return to contents]

def

fn def()

def - should be first

[Return to contents]

xyz

fn xyz()

xyz - should be in the middle a small script bold text bold end underlined text underline end a link main v repo

[Return to contents]

MyXMLDocument.abc

fn MyXMLDocument.abc(text string) ?(string, int)

MyXMLDocument.abc does something too... I just do not know what.

[Return to contents]

MyXMLDocument.from_file

fn MyXMLDocument.from_file(path string) !MyXMLDocument

MyXMLDocument.from_text processes the file path, and returns an error

[Return to contents]

MyXMLDocument.from_text

fn MyXMLDocument.from_text(text string) ?MyXMLDocument

MyXMLDocument.from_text processes text and produces none

[Return to contents]

MyXMLDocument

struct MyXMLDocument {
    path string
}

MyXMLDocument is here just to test the different combinations of methods/output types

[Return to contents]

instance_from_file

fn (x &MyXMLDocument) instance_from_file(path string) !MyXMLDocument

instance_from_file does stuff with path

[Return to contents]

instance_from_text

fn (x &MyXMLDocument) instance_from_text(text string) ?MyXMLDocument

instance_from_text does stuff with text

[Return to contents]

instance_abc

fn (x &MyXMLDocument) instance_abc(text string) ?(string, int)

instance_abc does stuff too

[Return to contents]

instance_void

fn (x &MyXMLDocument) instance_void()

instance_void does stuff too

[Return to contents]

instance_int

fn (x &MyXMLDocument) instance_int() int

instance_int does stuff too

[Return to contents]

instance_result

fn (x &MyXMLDocument) instance_result() !

instance_error does stuff too

[Return to contents]

instance_option

fn (x &MyXMLDocument) instance_option() ?

instance_option does stuff too

[Return to contents]

Powered by vdoc.