mirror of
https://github.com/rwinkhart/go-highlite.git
synced 2026-09-02 23:27:14 -04:00
Add readme and yaml.yaml file
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
# Syntax Files
|
||||
|
||||
Here are highlight's syntax files. If you would like to make a new syntax file, you should first check it
|
||||
with the `syntax_checker.go` program. Just place it in this directory and run the program (`go run syntax_checker.go`)
|
||||
and it will let you know if there are issues with any of the files in the directory.
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
filetype: c
|
||||
|
||||
detect:
|
||||
filename: "\\.(c|C)$"
|
||||
filename: "(\\.(c|C)$|\\.(h|H)$|\\.ii?$|\\.(def)$)"
|
||||
|
||||
rules:
|
||||
- identifier: "\\b[A-Z_][0-9A-Z_]+\\b"
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
filetype: yaml
|
||||
|
||||
detect:
|
||||
filename: "\\.ya?ml$"
|
||||
header: "%YAML"
|
||||
|
||||
rules:
|
||||
- type: "(^| )!!(binary|bool|float|int|map|null|omap|seq|set|str) "
|
||||
- constant: "\\b(YES|yes|Y|y|ON|on|NO|no|N|n|OFF|off)\\b"
|
||||
- constant: "\\b(true|false)\\b"
|
||||
- statement: "(:[[:space:]]|\\[|\\]|:[[:space:]]+[|>]|^[[:space:]]*- )"
|
||||
- identifier: "[[:space:]][\\*&][A-Za-z0-9]+"
|
||||
- type: "([-\\w]+:\\s+)|([-\\w]+:$)"
|
||||
- special: "(^---|^\\.\\.\\.|^%YAML|^%TAG)"
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- comment:
|
||||
start: "#"
|
||||
end: "$"
|
||||
rules: []
|
||||
|
||||
Reference in New Issue
Block a user