Skip to content

Commit

Permalink
Restore the compileString function
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-serrano committed Jul 6, 2024
1 parent f8cbec1 commit 6eeb3fe
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/hiphop.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* ------------------------------------------------------------- */
/* Author : Colin Vidal */
/* Creation : Mon Jul 16 11:23:59 2018 */
/* Last change : Sat Jul 6 09:34:58 2024 (serrano) */
/* Last change : Sat Jul 6 18:55:09 2024 (serrano) */
/* Copyright : 2018-24 Manuel Serrano */
/* ------------------------------------------------------------- */
/* HipHop language definition */
Expand All @@ -23,6 +23,13 @@ export * from "./machine.js";
export * from "./lang.js";
export { IN, OUT, INOUT } from "./ast.js";

/*---------------------------------------------------------------------*/
/* compileString ... */
/*---------------------------------------------------------------------*/
export function compileString(str) {
return parseString(`(() => {return ${str}})()\n`).generate({}).toString();
}

/*---------------------------------------------------------------------*/
/* machineDumpNets ... */
/* ------------------------------------------------------------- */
Expand Down

0 comments on commit 6eeb3fe

Please sign in to comment.