This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f230e7
commit 6d76c3c
Showing
10 changed files
with
3,235 additions
and
1,460 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class foo bar baz = object | ||
method field0 = bar + 1 | ||
method field1 = baz ^ "" | ||
end |
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,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); | ||
} |
Oops, something went wrong.