mirror of
https://github.com/rwinkhart/go-highlite.git
synced 2026-09-03 23:57:13 -04:00
Support initial batch of languages
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
//go:build stxR || stxAll
|
||||
|
||||
package syntax
|
||||
|
||||
func init() {
|
||||
syntaxMap["r"] = &lazySyntax{init: func() []byte {
|
||||
return []byte(`filetype: r
|
||||
|
||||
detect:
|
||||
filename: "\\.(r|R)$"
|
||||
|
||||
rules:
|
||||
- statement: "\\b(break|else|for|function|if|in|next|repeat|return|while)\\b"
|
||||
- constant: "\\b(TRUE|FALSE|NULL|Inf|NaN|NA|NA_integer_|NA_real_|NA_complex_|NA_character_)\\b"
|
||||
- comment:
|
||||
start: "#"
|
||||
end: "$"
|
||||
rules: []`)
|
||||
}}
|
||||
}
|
||||
Reference in New Issue
Block a user