From 233a3609f0b6aa1cd634a8f8394fc2eca5ff5e53 Mon Sep 17 00:00:00 2001 From: Aleksey Chichenkov Date: Wed, 30 Jan 2019 17:13:54 +0300 Subject: [PATCH] fix replasing --- main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.js b/main.js index f9a8c73..b24eea7 100644 --- a/main.js +++ b/main.js @@ -30,6 +30,8 @@ var post_process_lexer = function (_string) { _string = _string.replace(/\*\((.*?)\);/gm, "this._string[($1)];"); // замена разыменовываний _string = _string.replace(/\*(.* ?);/gm, "this._string[$1];"); // замена разыменовываний _string = _string.replace(/\*(.* ?)\)/gm, "this._string[$1])"); // замена разыменовываний + _string = _string.replace(/switch \(\(yych = \*this\._yy_cursor\)\) \{/gm, "this._yy_char = this._string[this._yy_cursor]; \nswitch(this._yy_char) {"); // замена разыменовываний + _string = _string.replace(/^yy(\d*?):/gm, "case $1:"); // replace goto marker onto case _string = _string.replace(/\) goto yy(\d*?);/gm, ") { id = $1; break; }"); // replace goto inside if