From 75b95e6739affc5f7949b6fe4ac288e1b0333abd Mon Sep 17 00:00:00 2001 From: DrMaxNix Date: Thu, 1 Sep 2022 19:31:19 +0200 Subject: [PATCH] :tada: start working on parser --- juicescript.js | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/juicescript.js b/juicescript.js index 4f76091..9e3a34b 100644 --- a/juicescript.js +++ b/juicescript.js @@ -20,21 +20,26 @@ class Juicescript { } } + /* + Parse given PROGRAM-STRING and store syntax tree + */ + parse(program_string){ + // DEVIDE INTO LINES // + var line_list = program_string.split("\n"); + /**/console.log(line_list); + } + // DEBUG STUFFS // - parse(program_string){ - this.program_string = program_string; - } - run(){ - this.io_stdout(this.program_string); - this.io_stderr_debug("This debug is a test"); - this.io_stderr_info("This info is a test"); - this.io_stderr_warning("This warning is a test"); - this.io_stderr_error("This error is a test"); + //this.io_stdout("stdout text"); + //this.io_stderr_debug("This debug is a test"); + //this.io_stderr_info("This info is a test"); + //this.io_stderr_warning("This warning is a test"); + //this.io_stderr_error("This error is a test"); }