scope

package
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArgumentIndex

func ArgumentIndex(arguments []Argument, name string) (idx int)

func LocalizationIndex

func LocalizationIndex(locs []Localization, lang language.Tag) (idx int)

func VariableScopeIndex

func VariableScopeIndex(variables []VariableScope, name string) (idx int)

Types

type Argument

type Argument struct {
	Name   string
	GoType ast.GoType
}

type Localization

type Localization struct {
	Name    string
	Lang    language.Tag
	Scopes  []MessageScope
	Imports []ast.GoImport
}

func (*Localization) AddImport

func (loc *Localization) AddImport(imp ast.GoImport)

type MessageScope

type MessageScope struct {
	Name      string
	Variables []VariableScope
	Plural    ast.Plural
	String    ast.FormatParts
	Arguments []Argument
}

func (*MessageScope) IsSimple

func (m *MessageScope) IsSimple() bool

type VariableScope

type VariableScope struct {
	ast.Variable
	ArgumentNames []string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL