s

package
Version: 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: 6 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SQL = internal.Register(MustNewLazyLexer(
	&Config{
		Name:            "SQL",
		Aliases:         []string{"sql"},
		Filenames:       []string{"*.sql"},
		MimeTypes:       []string{"text/x-sql"},
		NotMultiline:    true,
		CaseInsensitive: true,
	},
	sqlRules,
))

SQL lexer.

View Source
var SYSTEMD = internal.Register(MustNewLazyLexer(
	&Config{
		Name:    "SYSTEMD",
		Aliases: []string{"systemd"},

		Filenames: []string{"*.automount", "*.device", "*.dnssd", "*.link", "*.mount", "*.netdev", "*.network", "*.path", "*.scope", "*.service", "*.slice", "*.socket", "*.swap", "*.target", "*.timer"},
		MimeTypes: []string{"text/plain"},
	},
	systemdRules,
))
View Source
var Sas = internal.Register(MustNewLazyLexer(
	&Config{
		Name:            "SAS",
		Aliases:         []string{"sas"},
		Filenames:       []string{"*.SAS", "*.sas"},
		MimeTypes:       []string{"text/x-sas", "text/sas", "application/x-sas"},
		CaseInsensitive: true,
	},
	sasRules,
))

Sas lexer.

View Source
var Sass = internal.Register(MustNewLazyLexer(
	&Config{
		Name:            "Sass",
		Aliases:         []string{"sass"},
		Filenames:       []string{"*.sass"},
		MimeTypes:       []string{"text/x-sass"},
		CaseInsensitive: true,
	},
	sassRules,
))

Sass lexer.

View Source
var Scala = internal.Register(MustNewLazyLexer(
	&Config{
		Name:      "Scala",
		Aliases:   []string{"scala"},
		Filenames: []string{"*.scala"},
		MimeTypes: []string{"text/x-scala"},
		DotAll:    true,
	},
	scalaRules,
))

Scala lexer.

View Source
var SchemeLang = internal.Register(MustNewLazyLexer(
	&Config{
		Name:      "Scheme",
		Aliases:   []string{"scheme", "scm"},
		Filenames: []string{"*.scm", "*.ss"},
		MimeTypes: []string{"text/x-scheme", "application/x-scheme"},
	},
	schemeLangRules,
))

Scheme lexer.

View Source
var Scilab = internal.Register(MustNewLazyLexer(
	&Config{
		Name:      "Scilab",
		Aliases:   []string{"scilab"},
		Filenames: []string{"*.sci", "*.sce", "*.tst"},
		MimeTypes: []string{"text/scilab"},
	},
	scilabRules,
))

Scilab lexer.

View Source
var Scss = internal.Register(MustNewLazyLexer(
	&Config{
		Name:            "SCSS",
		Aliases:         []string{"scss"},
		Filenames:       []string{"*.scss"},
		MimeTypes:       []string{"text/x-scss"},
		NotMultiline:    true,
		DotAll:          true,
		CaseInsensitive: true,
	},
	scssRules,
))

Scss lexer.

View Source
var Sieve = internal.Register(MustNewLazyLexer(
	&Config{
		Name:      "Sieve",
		Aliases:   []string{"sieve"},
		Filenames: []string{"*.siv", "*.sieve"},
		MimeTypes: []string{},
	},
	func() Rules {
		return Rules{
			"root": {
				{`\s+`, Text, nil},
				{`[();,{}\[\]]`, Punctuation, nil},
				{`(?i)require`, KeywordNamespace, nil},
				{`(?i)(:)(addresses|all|contains|content|create|copy|comparator|count|days|detail|domain|fcc|flags|from|handle|importance|is|localpart|length|lowerfirst|lower|matches|message|mime|options|over|percent|quotewildcard|raw|regex|specialuse|subject|text|under|upperfirst|upper|value)`, ByGroups(NameTag, NameTag), nil},
				{`(?i)(address|addflag|allof|anyof|body|discard|elsif|else|envelope|ereject|exists|false|fileinto|if|hasflag|header|keep|notify_method_capability|notify|not|redirect|reject|removeflag|setflag|size|spamtest|stop|string|true|vacation|virustest)`, NameBuiltin, nil},
				{`(?i)set`, KeywordDeclaration, nil},
				{`([0-9.]+)([kmgKMG])?`, ByGroups(LiteralNumber, LiteralNumber), nil},
				{`#.*$`, CommentSingle, nil},
				{`/\*.*\*/`, CommentMultiline, nil},
				{`"[^"]*?"`, LiteralString, nil},
				{`text:`, NameTag, Push("text")},
			},
			"text": {
				{`[^.].*?\n`, LiteralString, nil},
				{`^\.`, Punctuation, Pop(1)},
			},
		}
	},
))

Sieve lexer.

View Source
var Smalltalk = internal.Register(MustNewLazyLexer(
	&Config{
		Name:      "Smalltalk",
		Aliases:   []string{"smalltalk", "squeak", "st"},
		Filenames: []string{"*.st"},
		MimeTypes: []string{"text/x-smalltalk"},
	},
	smalltalkRules,
))

Smalltalk lexer.

View Source
var Smarty = internal.Register(MustNewLazyLexer(
	&Config{
		Name:      "Smarty",
		Aliases:   []string{"smarty"},
		Filenames: []string{"*.tpl"},
		MimeTypes: []string{"application/x-smarty"},
		DotAll:    true,
	},
	smartyRules,
))

Smarty lexer.

View Source
var Snobol = internal.Register(MustNewLazyLexer(
	&Config{
		Name:      "Snobol",
		Aliases:   []string{"snobol"},
		Filenames: []string{"*.snobol"},
		MimeTypes: []string{"text/x-snobol"},
	},
	snobolRules,
))

Snobol lexer.

View Source
var Solidity = internal.Register(MustNewLazyLexer(
	&Config{
		Name:      "Solidity",
		Aliases:   []string{"sol", "solidity"},
		Filenames: []string{"*.sol"},
		MimeTypes: []string{},
		DotAll:    true,
	},
	solidityRules,
))

Solidity lexer.

View Source
var Sparql = internal.Register(MustNewLazyLexer(
	&Config{
		Name:      "SPARQL",
		Aliases:   []string{"sparql"},
		Filenames: []string{"*.rq", "*.sparql"},
		MimeTypes: []string{"application/sparql-query"},
	},
	sparqlRules,
))

Sparql lexer.

View Source
var Squidconf = internal.Register(MustNewLazyLexer(
	&Config{
		Name:            "SquidConf",
		Aliases:         []string{"squidconf", "squid.conf", "squid"},
		Filenames:       []string{"squid.conf"},
		MimeTypes:       []string{"text/x-squidconf"},
		NotMultiline:    true,
		CaseInsensitive: true,
	},
	squidconfRules,
))

Squidconf lexer.

View Source
var StandardML = internal.Register(MustNewLazyLexer(
	&Config{
		Name:      "Standard ML",
		Aliases:   []string{"sml"},
		Filenames: []string{"*.sml", "*.sig", "*.fun"},
		MimeTypes: []string{"text/x-standardml", "application/x-standardml"},
	},
	standardMLRules,
))

Standard ML lexer.

View Source
var Stylus = internal.Register(MustNewLazyLexer(
	&Config{
		Name:            "Stylus",
		Aliases:         []string{"stylus"},
		Filenames:       []string{"*.styl"},
		MimeTypes:       []string{"text/x-styl"},
		CaseInsensitive: true,
	},
	stylusRules,
))

Stylus lexer.

View Source
var Svelte = internal.Register(DelegatingLexer(h.HTML, MustNewLazyLexer(
	&Config{
		Name:      "Svelte",
		Aliases:   []string{"svelte"},
		Filenames: []string{"*.svelte"},
		MimeTypes: []string{"application/x-svelte"},
		DotAll:    true,
	},
	svelteRules,
)))

Svelte lexer.

View Source
var Swift = internal.Register(MustNewLazyLexer(
	&Config{
		Name:      "Swift",
		Aliases:   []string{"swift"},
		Filenames: []string{"*.swift"},
		MimeTypes: []string{"text/x-swift"},
	},
	swiftRules,
))

Swift lexer.

View Source
var Systemverilog = internal.Register(MustNewLazyLexer(
	&Config{
		Name:      "systemverilog",
		Aliases:   []string{"systemverilog", "sv"},
		Filenames: []string{"*.sv", "*.svh"},
		MimeTypes: []string{"text/x-systemverilog"},
		EnsureNL:  true,
	},
	systemvarilogRules,
))

Systemverilog 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