-
Notifications
You must be signed in to change notification settings - Fork 682
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1115 from DustinCampbell/new-syntax
Brand new TextMate grammar for providing C# syntax highlighting
- Loading branch information
Showing
45 changed files
with
18,630 additions
and
1,672 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import * as fs from 'fs'; | ||
import * as path from 'path'; | ||
import * as yaml from 'js-yaml'; | ||
import * as plist from 'plist'; | ||
|
||
function writePlistFile(grammar: any, fileName: string) { | ||
const text = plist.build(grammar); | ||
fs.writeFileSync(fileName, text, "utf8"); | ||
} | ||
|
||
function readYaml(fileName: string) { | ||
const text = fs.readFileSync(fileName, "utf8"); | ||
return yaml.safeLoad(text); | ||
} | ||
|
||
function buildGrammar() { | ||
const tsGrammar = readYaml("syntaxes/csharp.tmLanguage.yml"); | ||
|
||
// Write csharp.tmLanguage | ||
writePlistFile(tsGrammar, "syntaxes/csharp.tmLanguage"); | ||
} | ||
|
||
buildGrammar(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.