summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-10-28 23:07:42 +0000
committerPaul Buetow <paul@buetow.org>2008-10-28 23:07:42 +0000
commit8933f024f5a7374de8d62065a11524875ef68dca (patch)
tree028471a82e779a2f8c4d44ca60c35a4b7653e352
parentd8bff74a889e0be1781666e8c249a6b991c2ad6b (diff)
feierabend f. heute
-rw-r--r--src/core/function.c1
-rw-r--r--src/core/interpret.c36
-rw-r--r--src/core/reference.h2
3 files changed, 21 insertions, 18 deletions
diff --git a/src/core/function.c b/src/core/function.c
index 0c80e0a..bf8f1df 100644
--- a/src/core/function.c
+++ b/src/core/function.c
@@ -772,7 +772,6 @@ function_process_buildin(Interpret *p_interpret, Token *p_token_ident,
case TT_STRING:
printf("%s", token_get_val(p_token));
break;
- NO_DEFAULT;
}
}
stackiterator_delete(p_iter);
diff --git a/src/core/interpret.c b/src/core/interpret.c
index 3d2524a..ae69db0 100644
--- a/src/core/interpret.c
+++ b/src/core/interpret.c
@@ -1,13 +1,13 @@
/*:*
*: File: ./src/core/interpret.c
*: A simple interpreter
- *:
+ *:
*: WWW : http://fype.buetow.org
*: E-Mail : fype@dev.buetow.org
- *:
- *: Copyright (c) 2005 2006 2007 2008, Paul C. Buetow
+ *:
+ *: Copyright (c) 2005 2006 2007 2008, Paul C. Buetow
*: All rights reserved.
- *:
+ *:
*: Redistribution and use in source and binary forms, with or without modi-
*: fication, are permitted provided that the following conditions are met:
*: * Redistributions of source code must retain the above copyright
@@ -15,20 +15,20 @@
*: * Redistributions in binary form must reproduce the above copyright
*: notice, this list of conditions and the following disclaimer in the
*: documentation and/or other materials provided with the distribution.
- *: * Neither the name of P. B. Labs nor the names of its contributors may
- *: be used to endorse or promote products derived from this software
+ *: * Neither the name of P. B. Labs nor the names of its contributors may
+ *: be used to endorse or promote products derived from this software
*: without specific prior written permission.
- *:
- *: THIS SOFTWARE IS PROVIDED BY Paul Buetow AS IS'' AND ANY EXPRESS OR
- *: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *:
+ *: THIS SOFTWARE IS PROVIDED BY Paul Buetow AS IS'' AND ANY EXPRESS OR
+ *: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
*: WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- *: DISCLAIMED. IN NO EVENT SHALL Paul Buetow BE LIABLE FOR ANY DIRECT,
- *: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- *: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- *: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ *: DISCLAIMED. IN NO EVENT SHALL Paul Buetow BE LIABLE FOR ANY DIRECT,
+ *: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ *: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ *: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
*: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- *: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- *: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ *: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ *: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
*: POSSIBILITY OF SUCH DAMAGE.
*:*/
@@ -955,7 +955,9 @@ _term(Interpret *p_interpret) {
if (p_interpret->tt != TT_IDENT)
_INTERPRET_ERROR("Expexted identifier for '&'",
p_interpret->p_token);
- _INTERPRET_ERROR("nyi", p_interpret->p_token);
+
+
+ _INTERPRET_ERROR("nyi", p_interpret->p_token);
_NEXT;
return (1);
@@ -970,7 +972,7 @@ _term(Interpret *p_interpret) {
_INTERPRET_ERROR("Expexted identifier for '*'",
p_interpret->p_token);
- _INTERPRET_ERROR("nyi", p_interpret->p_token);
+ _INTERPRET_ERROR("nyi", p_interpret->p_token);
_NEXT;
return (1);
}
diff --git a/src/core/reference.h b/src/core/reference.h
index dd682bd..b410766 100644
--- a/src/core/reference.h
+++ b/src/core/reference.h
@@ -38,6 +38,8 @@
#include "../defines.h"
#include "symbol.h"
+#define reference_get_sym(r) (r->p_symbol)
+
typedef struct {
Symbol *p_symbol;
} Reference;