{"library":"objj-transpiler","title":"ObjJAcornCompiler - JavaScript/Objective-J Transpiler","description":"ObjJAcornCompiler is a tiny, fast JavaScript and Objective-J transpiler with a built-in C-like preprocessor, written in JavaScript. The current version is 1.0.0-10 (pre-release), built on an extended Acorn parser. It supports multiple ECMAScript versions (ECMA5, ECMA8, latest), loose mode, and various output options like AST generation and source maps. Key differentiators: it is the primary transpiler for the Cappuccino framework, targeting Objective-J 2.0 syntax; includes a preprocessor for macros and conditionals; and is available as an npm package. However, it cannot compile Objective-J code that depends on other files without the Objective-J runtime.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install objj-transpiler"],"cli":null},"imports":["import transpiler from 'objj-transpiler'","import { transpile } from 'objj-transpiler'","import { Parser } from 'objj-transpiler'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { transpile } from 'objj-transpiler';\n\nconst code = `\n#define MAX(x, y) (x > y ? x : y)\nvar m1 = MAX(a, b);\nvar m2 = MAX(14, 20);\n`;\n\nconst result = transpile(code, {\n  module: false,\n  ecmaVersion: 'latest',\n  loose: false,\n  noObjj: false,\n  noPreprocess: false\n});\n\nconsole.log(result.code);\n// Output:\n// var m1 = a > b ? a : b;\n// var m2 = 14 > 20 ? 14 : 20;","lang":"typescript","description":"Transpile JavaScript with preprocessor macros (e.g., #define) using the transpile function, showing macro expansion.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}