func cssRules() []edit.Rule {
	return []edit.Rule{
		mustCompile(`/\*.*?\*/`, commentID),
		mustCompile(`^\S*[^:] `, keywordID),
		mustCompile(`\S+;`, literalID),
	}
}
cssRules returns syntax highlighting rules for CSS.
package main
import "github.com/jangler/edit"
func mustCompile(pattern string, id int) edit.Rule {
	rule, err := edit.NewRule(pattern, id)
	if err != nil {
		panic(err)
	}
	return rule
}
const (
	commentID = iota
	keywordID
	literalID
)
var syntaxMap = map[string]func() []edit.Rule{
	"[bash]":       bashRules,
	"[c]":          cRules,
	"[css]":        cssRules,
	"[go]":         goRules,
	"[html]":       htmlRules,
	"[ini]":        iniRules,
	"[javascript]": javaScriptRules,
	"[json]":       jsonRules,
	"[lua]":        luaRules,
	"[make]":       makefileRules,
	"[python]":     pythonRules,
	"[ruby]":       rubyRules,
	"[svg]":        svgRules,
}
func bashRules() []edit.Rule {
	return []edit.Rule{
		mustCompile(`\$#`, -1),
		mustCompile(`#.*$`, commentID),
		mustCompile(`[!:.]| \[\[? | \]\]?|\b(alias|bg|bind|break|builtin|`+
			`caller|case|cd|command|compgen|complete|compopt|continue|`+
			`declare|dirs|disown|do|done|echo|elif|else|enable|esac|eval|`+
			`exec|exit|export|false|fc|fg|fi|for|function|getopts|hash|help|`+
			`history|if|in|jobs|kill|let|local|logout|mapfile|popd|printf|`+
			`pushd|pwd|read|readarray|readonly|return|select|set|shift|shopt|`+
			`source|suspend|test|then|time|times|trap|true|type|typeset|`+
			`ulimit|umask|unalias|unset|until|wait|while)\b`, keywordID),
		mustCompile(`\$?("(\\.|[^"])*?"|'(\\.|[^'])*?')`, literalID),
		mustCompile("`(\\.|[^`])*?`", literalID),
	}
}
// cRules returns syntax highlighting rules for C.
func cRules() []edit.Rule {
	return []edit.Rule{
		mustCompile(`^#(define|undef|include|if|elif|else|endif|ifdef|ifndef|`+
			`line|pragma).*$`, commentID),
		mustCompile(`//.+?$`, commentID),
		mustCompile(`/\*.*?\*/`, commentID),
		mustCompile(`\b(auto|break|case|char|const|continue|default|do|`+
			`double|else|enum|extern|float|for|goto|if|inline|int|long|`+
			`register|restrict|return|short|signed|sizeof|static|struct|`+
			`switch|typedef|union|unsigned|void|volatile|while|_Bool|`+
			`_Complex|_Imaginary)\b`, keywordID),
		mustCompile(`\b(bool|true|false|NULL)\b`, literalID),
		mustCompile(`L?'(\\.|[^'])*?'|"(\\.|[^"])*?"`, literalID),
		mustCompile(`\b(\d+\.\d*|\d*\.\d+|\d+)([eEpP][+-]?\d+)?`+
			`[fFlL]?\b`, literalID),
		mustCompile(`\b(0([bB][01]+|[0-7]+|[xX][0-9a-fA-F]+)|\d+)`+
			`([uU]?[lL]?|[lL]?[uU]?)\b`, literalID),
	}
}