nitron

commit 7db12beb5a63132d8681b88dc1cb5eaa4c21c765

Author: mesyeti <mesyeti@mesyeti.uk>

fix bugs with imports

 basic-std/compile_test.sh | 10 ++++++++++
 basic-std/test.bas | 2 ++
 basic/source/semanticAnalysis.c | 2 +-
 build.sh | 2 +-


diff --git a/basic/source/semanticAnalysis.c b/basic/source/semanticAnalysis.c
index eef204090345ff1a5308d5e180ffb6018027d02c..610d709c48dffe66a8316c13f56401ba5685a47a 100644
--- a/basic/source/semanticAnalysis.c
+++ b/basic/source/semanticAnalysis.c
@@ -452,7 +452,7 @@
  			// create variable for this function
  			Var funcVar;
  			funcVar.type = (UsedType) {0, funcTypeIdx, 0};
- 			funcVar.name = node->funcDef.dec.name;
+ 			funcVar.name = NewString(node->funcDef.dec.name);
 
  			State_AddVar(funcVar);
 




diff --git a/basic-std/compile_test.sh b/basic-std/compile_test.sh
index 650b524b5ae25d8b9adbc7ea1c56d037a4fac893..edfe7da131819f21efa83dde1adeaf66063ed4ad 100755
--- a/basic-std/compile_test.sh
+++ b/basic-std/compile_test.sh
@@ -1,3 +1,13 @@
 nitron-basic test.bas --obj -o test.o
+
+if [ $? -ne 0 ]; then
+	exit
+fi
+
 gcc test.o libstd.a -o out
+
+if [ $? -ne 0 ]; then
+	exit
+fi
+
 rm test.o.c test.o




diff --git a/basic-std/test.bas b/basic-std/test.bas
index c8029f0ca77f171a8d37c52efcbe026bb3882d26..550eced053f04131f9b32383d8a8ec160d44599b 100644
--- a/basic-std/test.bas
+++ b/basic-std/test.bas
@@ -1,3 +1,5 @@
+'NITRON
+
 program test
 
 import std.io




diff --git a/build.sh b/build.sh
index 6042e6567d46a1ad9dbb0069ea2a3547c21de081..3f7a470511e98af545fda00acf9eadeb7400f258 100755
--- a/build.sh
+++ b/build.sh
@@ -31,7 +31,7 @@ 	echo "Compilation failed"
 	exit
 fi
 cd ..
-mv basic-std/libstd.a out/lib
+cp basic-std/libstd.a out/lib
 cp -r basic-std/std out/src
 
 echo "Finished building nitron"