server/parser/inline/inline-syntax.js
//////////////////////// Storing variable info inside an global object ///////////////////////////
Storing variable info inside an global object
Storing variable info inside an global object
function storeVarInfo(
    offset,
    name,
    type,
    key = undefined,
    member = null,
    group = null
  ) {
    let typeArray = [];
    if (key === undefined) {
      let keys = Object.keys(task.varNames);
      for (let i = 0; i < keys.length; i++) {
        if (task.varNames[keys[i]] === name) {
          key = keys[i][0];
        };
      };
    };
    if (type !== undefined && type.length > 1) {
      let tmpArr = type.split("");
      for (let i = 0; i < tmpArr.length; i++) {
        typeArray.push(dataTypes[tmpArr[i]]);
      };
    } else if (type !== undefined && type.length === 1) {
      typeArray = dataTypes[type];
    } else {
      typeArray = "random";
    };
    return {
      startingIndex: offset,
      key,
      name,
      type: typeArray,
      member,
      group
    };
  }
function storeVarInfo ( offset , name , type , key = undefined , member = null , group = null ) { let typeArray = [ ] ; if ( key === undefined ) { let keys = Object . keys ( task . varNames ) ; for ( let i = 0 ; i < keys . length ; i ++ ) { if ( task . varNames [ keys [ i ] ] === name ) { key = keys [ i ] [ 0 ] ; } ; } ; } ; if ( type !== undefined && type . length > 1 ) { let tmpArr = type . split ( "" ) ; for ( let i = 0 ; i < tmpArr . length ; i ++ ) { typeArray . push ( dataTypes [ tmpArr [ i ] ] ) ; } ; } else if ( type !== undefined && type . length === 1 ) { typeArray = dataTypes [ type ] ; } else { typeArray = "random" ; } ; return { startingIndex : offset , key , name , type : typeArray , member , group } ; }
Storing variable info inside an global object
Storing variable info inside an global object