Linux fixes

This commit is contained in:
Felix Brendel
2018-10-15 10:35:03 +02:00
parent f6c2219bd5
commit bd0e541d80
4 changed files with 6 additions and 7 deletions
+1
View File
@@ -4,3 +4,4 @@
*.exe *.exe
*.user *.user
/vs/*/* /vs/*/*
/bin/slime
+2 -5
View File
@@ -1,9 +1,6 @@
mkdir quickbuild clang src/main.c -g -o ./bin/slime --std=c99 || exit 1
clang src/main.c -g -o ./quickbuild/lisp --std=c99 || exit 1
echo "" echo ""
echo "--- Output Start ---" echo "--- Output Start ---"
./quickbuild/lisp ./bin/slime
echo "--- Output End ---" echo "--- Output End ---"
rm -rf quickbuild
+2 -1
View File
@@ -285,12 +285,13 @@ Ast_Node* eval_expr(Ast_Node* node, Environment* env) {
case Ast_Node_Type_Nil: case Ast_Node_Type_Nil:
ret->type = Ast_Node_Type_Nil; ret->type = Ast_Node_Type_Nil;
return ret; return ret;
case Ast_Node_Type_Symbol: case Ast_Node_Type_Symbol: {
Ast_Node* symbol; Ast_Node* symbol;
try { try {
symbol = lookup_symbol(node->value.symbol, env); symbol = lookup_symbol(node->value.symbol, env);
} }
return symbol; return symbol;
}
case Ast_Node_Type_Number: case Ast_Node_Type_Number:
case Ast_Node_Type_Keyword: case Ast_Node_Type_Keyword:
case Ast_Node_Type_String: case Ast_Node_Type_String:
+1 -1
View File
@@ -115,7 +115,7 @@ char* read_line() {
if((*line++ = (char)c) == '\n') if((*line++ = (char)c) == '\n')
break; break;
} }
*line--; // we dont want the \n actually (*line)--; // we dont want the \n actually
*line = '\0'; *line = '\0';
return linep; return linep;
} }