Add readme and yaml.yaml file

This commit is contained in:
Zachary Yedidia
2017-02-18 10:47:31 -05:00
parent c5a9df25ab
commit 3ef9cb838a
7 changed files with 187 additions and 6 deletions
+5
View File
@@ -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
View File
@@ -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"
+32
View File
@@ -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: []