From 0b9bafb004c734e59814ff821fed30d164a77fb7 Mon Sep 17 00:00:00 2001 From: a3boot Date: Fri, 13 Nov 2020 12:14:50 +0300 Subject: [PATCH] OFFN, LIMS parse without values --- lib/interpretator.js | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/lib/interpretator.js b/lib/interpretator.js index 89035ed..2025e3e 100644 --- a/lib/interpretator.js +++ b/lib/interpretator.js @@ -9,7 +9,6 @@ import {replacements} from "./replacements"; import {insertRnd, insertChr} from './element-insert'; import stringParse from './stringParse'; - const myMath = new sinumerikMath(); export function progParser(lastLineNum) { @@ -237,6 +236,7 @@ function parseDataClear(programName) { } function parseRows(programText, programName, variables) { + console.log('parseRows for ' + programName); // console.log(programText); @@ -325,7 +325,9 @@ function parseRows(programText, programName, variables) { var primitives = generatePrimitives(rowText, programName, row); + if (primitives) { + for (let i = 0; i < primitives.length; i++) { for (var iter in primitives[i].operators) { @@ -1423,7 +1425,7 @@ function generateCanvasPrimitives(primitives, programName, row) { var elements = insertChr(View.sinumerikView.parseData.prevMove[0], canvasElement, programName); if (View.sinumerikView.parseData.prevMove[0].type == 'G1') { View.sinumerikView.parseData.prevMove[0].toolRadiusCompensation = View.sinumerikView.parseData.toolRadiusCompensation; - View.sinumerikView.parseData.canvas.push(View.sinumerikView.parseData.prevMove[0]); + // View.sinumerikView.parseData.canvas.push(View.sinumerikView.parseData.prevMove[0]); } View.sinumerikView.parseData.prevMove.shift(); } @@ -2173,6 +2175,27 @@ function generatePrimitives(rowText, programName, progRowNum) { } //endregion + //region OFFN + regEx = /(?