Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
[syntax] OCaml highlighting wip
Browse files Browse the repository at this point in the history
  • Loading branch information
freebroccolo committed Dec 26, 2016
1 parent 3f230e7 commit 6d76c3c
Show file tree
Hide file tree
Showing 10 changed files with 3,235 additions and 1,460 deletions.
4 changes: 4 additions & 0 deletions examples/Example.ml
@@ -0,0 +1,4 @@
class foo bar baz = object
method field0 = bar + 1
method field1 = baz ^ ""
end
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -3,7 +3,7 @@
"name": "reasonml",
"displayName": "Reason",
"description": "Reason language support",
"version": "0.0.94",
"version": "0.0.96",
"publisher": "freebroccolo",
"license": "Apache-2.0",
"bugs": {
Expand Down
21 changes: 21 additions & 0 deletions script/syntax.js
@@ -0,0 +1,21 @@
#!/usr/bin/env node

const fs = require("fs");
const path = require("path");
const languages = ["ocaml"];

function inPath(language) {
return path.resolve(".", "out", "src", "syntaxes", language);
}

function outPath(language) {
return path.resolve(".", "syntaxes", `${language}.json`);
}

for (const language of languages) {
const from = inPath(language);
const into = outPath(language);
const data = require(from);
const json = JSON.stringify(data.default);
fs.writeFileSync(into, json);
}

0 comments on commit 6d76c3c

Please sign in to comment.