浏览代码

added tabbing support

Noah 4 年之前
父节点
当前提交
2191c9394e
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 2 2
      README.md
  2. 1 1
      build-etc/tibasicc

+ 2 - 2
README.md

@@ -12,9 +12,9 @@ There is an unmaintained FOSS *(Free and Open Source Software)* [Project on Sour
 
     wine [path to your .exe]/tibasic.exe [filename]
 
-Note that my .tibasic files contain *comments* and *empty lines* that have to be removed before compiling, because the compiler lacks a preprocessor. You can archive for example using `sed`:
+Note that my .tibasic files contain *comments*, *tabbing* and *empty lines* that have to be removed before compiling, because the compiler lacks a preprocessor. You can archive for example using `sed`:
 
-    sed "s/\s*#.*//g; /^$/ d" [inputfile] > [outputfile]
+    sed "s/\s*#.*//g; s/^\s*//g; /^$/ d" [inputfile] > [outputfile]
 
 I have made a bash script that automates this process in the 'build-etc' directory *(Please note that you have to **manually** change the filepath of the .exe file in the script)* I recommend putting this file in your $PATH so you can *preprocess and compile* using this simple syntax:
 

+ 1 - 1
build-etc/tibasicc

@@ -6,7 +6,7 @@
 # make a temporary directory to run the preprocessor before compiling
 mkdir .preprocessor-temp-dir
 cp "$1" ".preprocessor-temp-dir/$1" 
-sed -i "s/\s*#.*//g; /^$/ d" ".preprocessor-temp-dir/$1"
+sed -i "s/\s*#.*//g; s/^\s*//g; /^$/ d" ".preprocessor-temp-dir/$1"
 
 # run the actual compiler
 wine ~/.winetesting/tibasic-1.4.4/tibasic.exe ".preprocessor-temp-dir/$1" &>/tmp/tibasic-preprocessor.log