Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // The default map that i18next uses DefaultI18NextLexerMap = map[string]TokenKind{ "{{": TokenPrefix, "}}": TokenSuffix, ",": TokenFormatSeperator, "$t(": TokenNestingPrefix, ")": TokenNestingSuffix, } )
Functions ¶
This section is empty.
Types ¶
type Lexer ¶
func (*Lexer) FindAllTokens ¶
func (*Lexer) TokenMapLookup ¶
TokenMapLookup returns the literal currently assigned to a token Mostly used for improved error-messages.
type TokenKind ¶
type TokenKind string
const ( TokenEOF TokenKind = "EOF" TokenPrefix TokenKind = "TokenPrefixInterpolation" TokenSuffix TokenKind = "TokenSuffixInterpolation" TokenLiteral TokenKind = "TokenLiteral" TokenArgument TokenKind = "TokenArgument" // Used by the parser // Can follow TokenPrefix, or TokenNestingPrefix TokenFormatSeperator TokenKind = "(Format)/Nesting seperator" // These two Seperators are often, but not always the same token... TokenNestingSeperator TokenKind = "Format/(Nesting) seperator" TokenNestingPrefix TokenKind = "NestingPrefix" TokenNestingSuffix TokenKind = "NestingSuffix" )
Click to show internal directories.
Click to hide internal directories.