Module symbols

symbols
Version:
0.0.1
License:
MIT
Dependencies from vmod:
2
Imports:
4
Imported by:
5
Repository:
OS-specific
Show selected OS-specific symbols.
Backend-specific
Show selected Backend-specific symbols.

Dependencies defined in v.mod

  • srackham.pcre2
  • markdown

Imports

Aliases

This section is empty.

Constants

This section is empty.

Sum types

This section is empty.

Functions

#fn extract_attributes

fn extract_attributes(attrs []v.ast.Attr) map[string]string

#fn extract_symbols_from_file

fn extract_symbols_from_file(table &v.ast.Table, file v.ast.File, universe_name string) []NamedSymbol

extract_symbols_from_file extracts all symbols from a file.

#fn get_platform

fn get_platform(s NamedSymbol) Platform

#fn pascal_case_to_snake_case

fn pascal_case_to_snake_case(s string) string

#fn platform_from_filename

fn platform_from_filename(filename string) Platform

#fn platform_from_string

fn platform_from_string(platform_str string) !Platform

#fn platform_to_string

fn platform_to_string(platform Platform) string

#fn snake_case_to_pascal_case

fn snake_case_to_pascal_case(s string) string

Structs

#struct Comments

pub struct Comments {
pub:
	comments []ast.Comment
}

Comments описывает обертку над массивом комментариев из AST.

#fn (Comments) text

fn (c Comments) text() string

text возвращает текст комментариев, объединенный в одну строку.

#struct Constant

pub struct Constant {
pub:
	universe_name string
	module_name   string
	name          string
	comments      Comments
	file          &ast.File
	decl          ast.ConstField
	parent        ast.ConstDecl
	table         &ast.Table
}

#fn (&Constant) fqn

fn (c &Constant) fqn() string

#fn (&Constant) is_pub

fn (c &Constant) is_pub() bool

#fn (&Constant) is_type

fn (_ &Constant) is_type() bool

#fn (&Constant) pos

fn (c &Constant) pos() v.token.Pos

#fn (&Constant) attributes

fn (c &Constant) attributes() map[string]string

#fn (&Constant) str

fn (c &Constant) str() string

#struct Function

pub struct Function {
pub:
	universe_name string
	module_name   string
	name          string
	comments      Comments
	file          &ast.File
	decl          ast.FnDecl
	table         &ast.Table
}

#fn (&Function) fqn

fn (f &Function) fqn() string

#fn (&Function) is_pub

fn (f &Function) is_pub() bool

#fn (&Function) is_type

fn (_ &Function) is_type() bool

#fn (&Function) pos

fn (f &Function) pos() v.token.Pos

#fn (&Function) attributes

fn (f &Function) attributes() map[string]string

#fn (&Function) str

fn (f &Function) str() string

#struct Method

heap
pub struct Method {
pub:
	universe_name string
	module_name   string
	name          string
	comments      Comments
	file          &ast.File
	decl          ast.FnDecl
	table         &ast.Table
}

#fn (&Method) fqn

fn (m &Method) fqn() string

#fn (&Method) is_pub

fn (m &Method) is_pub() bool

#fn (&Method) is_type

fn (_ &Method) is_type() bool

#fn (&Method) pos

fn (m &Method) pos() v.token.Pos

#fn (&Method) attributes

fn (m &Method) attributes() map[string]string

#fn (&Method) receiver_type

fn (m &Method) receiver_type() &v.ast.TypeSymbol

#fn (&Method) receiver_type_name

fn (m &Method) receiver_type_name() ?string

#struct Struct

pub struct Struct {
pub:
	universe_name string
	module_name   string
	name          string
	comments      Comments
	file          &ast.File
	decl          ast.StructDecl
	table         &ast.Table
}

#fn (&Struct) fqn

fn (s &Struct) fqn() string

#fn (&Struct) is_pub

fn (s &Struct) is_pub() bool

#fn (&Struct) is_type

fn (_ &Struct) is_type() bool

#fn (&Struct) pos

fn (s &Struct) pos() v.token.Pos

#fn (&Struct) attributes

fn (s &Struct) attributes() map[string]string

#fn (&Struct) str

fn (s &Struct) str() string

#struct Enum

pub struct Enum {
pub:
	universe_name string
	module_name   string
	name          string
	comments      Comments
	file          &ast.File
	decl          ast.EnumDecl
	table         &ast.Table
}

#fn (&Enum) fqn

fn (e &Enum) fqn() string

#fn (&Enum) is_pub

fn (e &Enum) is_pub() bool

#fn (&Enum) is_type

fn (_ &Enum) is_type() bool

#fn (&Enum) pos

fn (e &Enum) pos() v.token.Pos

#fn (&Enum) attributes

fn (e &Enum) attributes() map[string]string

#struct Interface

pub struct Interface {
pub:
	universe_name string
	module_name   string
	name          string
	comments      Comments
	file          &ast.File
	decl          ast.InterfaceDecl
	table         &ast.Table
}

#fn (&Interface) fqn

fn (i &Interface) fqn() string

#fn (&Interface) is_pub

fn (i &Interface) is_pub() bool

#fn (&Interface) is_type

fn (_ &Interface) is_type() bool

#fn (&Interface) pos

fn (i &Interface) pos() v.token.Pos

#fn (&Interface) attributes

fn (i &Interface) attributes() map[string]string

#struct Alias

pub struct Alias {
pub:
	universe_name string
	module_name   string
	name          string
	comments      Comments
	file          &ast.File
	decl          ast.AliasTypeDecl
	table         &ast.Table
}

#fn (&Alias) fqn

fn (a &Alias) fqn() string

#fn (&Alias) is_pub

fn (a &Alias) is_pub() bool

#fn (&Alias) is_type

fn (_ &Alias) is_type() bool

#fn (&Alias) pos

fn (a &Alias) pos() v.token.Pos

#fn (&Alias) attributes

fn (_ &Alias) attributes() map[string]string

#struct SumType

pub struct SumType {
pub:
	universe_name string
	module_name   string
	name          string
	comments      Comments
	file          &ast.File
	decl          ast.SumTypeDecl
	table         &ast.Table
}

#fn (&SumType) fqn

fn (s &SumType) fqn() string

#fn (&SumType) is_pub

fn (s &SumType) is_pub() bool

#fn (&SumType) is_type

fn (_ &SumType) is_type() bool

#fn (&SumType) pos

fn (s &SumType) pos() v.token.Pos

#fn (&SumType) attributes

fn (_ &SumType) attributes() map[string]string

Interfaces

#interface NamedSymbol

pub interface NamedSymbol {
	universe_name string
	module_name string
	name string
	comments Comments
	file &ast.File
	fqn() string
	is_pub() bool
	is_type() bool
	pos() token.Pos
	attributes() map[string]string
}

NamedSymbol describe single symbol (struct, function, etc.) in the source code.

#fn (NamedSymbol) universe_id

fn (s NamedSymbol) universe_id() string

#fn (NamedSymbol) kind

fn (s NamedSymbol) kind() string

Enums

#enum Platform

pub enum Platform {
	auto
	ios
	macos
	linux
	windows
	freebsd
	openbsd
	netbsd
	dragonfly
	js
	android
	termux
	solaris
	serenity
	vinix
	haiku
	raw
	cross
	default
}