IndoriLang v1.0 Compiler and Transpiler - A programming language in authentic Indori slang
npm install @indori-lang/compilerThe core compiler package for IndoriLang - a programming language in authentic Indori slang.
``bash`
npm install @indori-lang/compiler
`typescript
import { IndoriCompiler } from '@indori-lang/compiler';
const compiler = new IndoriCompiler();
const result = compiler.compile('kaam x laa_re 10; bhiya_bol(x);');
if (result.success) {
console.log(result.javascriptCode);
} else {
console.error(result.error);
}
`
Main compiler class that provides methods for tokenization, parsing, and transpilation.
#### Methods
- compile(sourceCode: string): CompileResult - Compiles IndoriLang source code to JavaScripttokenize(sourceCode: string): TokenizeResult
- - Tokenizes source codeparse(tokens: Token[]): ParseResult
- - Parses tokens into ASTtranspile(ast: Program): TranspileResult` - Transpiles AST to JavaScript
-
MIT