Add more syntax files and include syntax highlighter in the repo

This commit is contained in:
Zachary Yedidia
2017-02-25 17:02:39 -05:00
parent e6e190942c
commit bd0c5c655e
14 changed files with 807 additions and 6 deletions

View File

@@ -0,0 +1,30 @@
package main
import (
"fmt"
"io/ioutil"
"strings"
"github.com/zyedidia/micro/cmd/micro/highlight"
)
func main() {
files, _ := ioutil.ReadDir(".")
hadErr := false
for _, f := range files {
if strings.HasSuffix(f.Name(), ".yaml") {
input, _ := ioutil.ReadFile("/Users/zachary/gocode/src/github.com/zyedidia/highlight/syntax_files/" + f.Name())
_, err := highlight.ParseDef(input)
if err != nil {
hadErr = true
fmt.Printf("%s:\n", f.Name())
fmt.Println(err)
continue
}
}
}
if !hadErr {
fmt.Println("No issues!")
}
}