z

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Zed = internal.Register(MustNewLazyLexer(
	&Config{
		Name:      "Zed",
		Aliases:   []string{"zed"},
		Filenames: []string{"*.zed"},
		MimeTypes: []string{"text/zed"},
	},
	zedRules,
).SetAnalyser(func(text string) float32 {
	if strings.Contains(text, "definition ") && strings.Contains(text, "relation ") && strings.Contains(text, "permission ") {
		return 0.9
	}
	if strings.Contains(text, "definition ") {
		return 0.5
	}
	if strings.Contains(text, "relation ") {
		return 0.5
	}
	if strings.Contains(text, "permission ") {
		return 0.25
	}
	return 0.0
}))

Zed lexer.

View Source
var Zig = internal.Register(MustNewLazyLexer(
	&Config{
		Name:      "Zig",
		Aliases:   []string{"zig"},
		Filenames: []string{"*.zig"},
		MimeTypes: []string{"text/zig"},
	},
	zigRules,
))

Zig lexer.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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