You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
letfileName=process.argv[2]+".pet";// initialize the filename from the script call from the CLI
37
+
letfileName=process.argv[2]+".peth";// initialize the filename from the script call from the CLI
38
38
letfilePath=path.join(process.cwd(),"src/"+fileName);//initialize the filepath by merging the path of the current working directory and the provided file
39
-
letvarFileName=process.argv[2]+".vpet";// initialize the variable filename from the script call from the CLI
39
+
letvarFileName=process.argv[2]+".vpeth";// initialize the variable filename from the script call from the CLI
40
40
letvarFilePath=path.join(process.cwd(),"src/"+varFileName);//initialize the variable filepath by merging the path of the current working directory and the provided file
41
41
42
42
letvars={};// initialize an object to store the variables
@@ -84,10 +84,10 @@ if(fs.existsSync(varFilePath)){ // if a file with the path in 'varFilePath' exis
84
84
}
85
85
}
86
86
87
-
letlineStructure1=/^\s*peththa\?(keep|repeat|reverse|jumble|rotateR|rotateL):bath\?(str|int|bigInt):kawada\?(\d+|".+"|\([a-zA-Z]\w+\))\[(log|store)\]({\d+})?$/;// 1st regex for valid line structure in .pth file
88
-
letlineStructure2=/^\s*<(keep|repeat|reverse|jumble|rotateR|rotateL)>\[(log|store)\]({\d+})?$/;// 2nd regex for valid line structure in .pth file
89
-
letemptyLine=/^(|\s+)$/;// regex for an empty line in .pth file
90
-
letcommentedLine=/^###.+$/;// regex for a commented line in .pth file
87
+
letlineStructure1=/^\s*peththa\?(keep|repeat|reverse|jumble|rotateR|rotateL):bath\?(str|int|bigInt):kawada\?(\d+|".+"|\([a-zA-Z]\w+\))\[(log|store)\]({\d+})?$/;// 1st regex for valid line structure in .peth file
88
+
letlineStructure2=/^\s*<(keep|repeat|reverse|jumble|rotateR|rotateL)>\[(log|store)\]({\d+})?$/;// 2nd regex for valid line structure in .peth file
89
+
letemptyLine=/^(|\s+)$/;// regex for an empty line in .peth file
90
+
letcommentedLine=/^###.+$/;// regex for a commented line in .peth file
91
91
92
92
if(fs.existsSync(filePath)&&varErrState===false){// if the file at 'filePath' exists and there was no error in processing the variables...
93
93
letfileContent=fs.readFileSync(filePath,{"encoding":"utf-8"});// get the file content
0 commit comments