lemon fix

This commit is contained in:
Aleksey Chichenkov 2019-01-29 13:40:28 +03:00
parent bad6b2e16c
commit f815210203
3 changed files with 6 additions and 2 deletions

View File

@ -53,7 +53,7 @@ var post_process_parser = function () {
if(args["t"] !== undefined) {
switch (args["t"]) {
case "web":
out_js = "(function(){\n" + out_js + "return Lexer; \n})()";
out_js = "(function(){\n" + out_js + "return LemonJS; \n})()";
break;
case "node":
out_js += "\n\n module.exports = LemonJS;";

View File

@ -2,8 +2,8 @@
%token_prefix TOKEN_
%left OR.
%left AND.
%left OR.
%right NOT.
%include {

View File

@ -56,6 +56,10 @@ var test = function() {
var test_time = LemonJS('add == Time [29/12/2019 15:01:24 441000]').tree;
fs.writeFileSync("tests/test_time.json", JSON.stringify(test_time, true, 3));
var test_exp_1 = LemonJS('(add == Time [29/12/2019 15:01:24 441000]) and ddds == "sdfasdf" or a == 123 and v == 155').tree;
fs.writeFileSync("tests/test_exp_1.json", JSON.stringify(test_exp_1, true, 3));
};