npm install irojs
Basic syntax
iro compile <source> --targets=<targetlist>
Valid output targets:
textmate
ortm
textmate.xml
(default)textmate.json
ace
ace.js
(default)ace.json
ast
(outputs the rion ast)none
Use <target>.*
to match all extensions
Example:
iro compile mygrammar.iro --targets=textmate,ace -o out/
Example:
import * as iro from "irojs";
// or
const iro = require("irojs");
const myGrammar = "...";
var result = iro.compile(myGrammar, { textmate: true });
console.log(result.textmate);
Use pnpm build
to build the package.
Use pnpm types
to compile the type definition files.