Frasydi Makassar

raw JSON →
1.1.1 verified Fri May 01 auth: no javascript

A TypeScript-based transpiler and interpreter for `.mks` scripts using Makassar-inspired keyword syntax. Converts `.mks` to JavaScript and executes via Node.js. Current version 1.1.1, released as an npm package with CLI commands `frasydi-makassar` and `mks`. Differentiators include simple regex rule-based transformation, easy extensibility by adding rules, and focus on Indonesian regional language keywords. Supports if-else, while loops, variable assignment, function definition, and console output.

error TypeError: frasydiMakassar is not a function
cause Importing the default export instead of named export.
fix
Change to import { frasydiMakassar } from 'frasydi-makassar'.
error Error: Cannot find module 'frasydi-makassar'
cause Package not installed or wrong Node.js version (requires ESM).
fix
Run npm install -g frasydi-makassar and ensure Node.js >= 12.
error SyntaxError: Unexpected token ';' at script.mks:1
cause Using semicolon instead of comma after condition.
fix
Replace ; with , in conditions: ketika 1 == 1, jari.
gotcha Arabic comma syntax is required for condition checks: use comma `,` not `;` after condition.
fix Ensure conditions are written with a comma before `jari`, e.g., `ketika 1 == 1, jari`.
gotcha Variables must start with a capital letter? No, but the regex in rules.ts expects certain patterns; ensure variable names follow the expected pattern.
fix Check rules.ts for exact regex patterns – variable names should match the expected capture groups.
gotcha Only one-line constructs are supported; multi-line blocks must use explicit `jari` and `tongko`.
fix Always wrap block bodies with `jari` and `tongko`.
gotcha Function definition requires a comma after arguments: `fungsi NAMA(ARG1, ARG2, ...), maka`.
fix Include comma before `maka` in function definitions.
npm install frasydi-makassar
yarn add frasydi-makassar
pnpm add frasydi-makassar

Shows how to install globally, create a simple `.mks` script, and execute it using the `mks` CLI command.

// Install globally
npm install -g frasydi-makassar

// Create script.mks file
cat > script.mks << 'EOF'
ketika 1 == 1, jari
    akkanako("Halo Dunia")
tongko
EOF

// Run with CLI
mks script.mks