aboutsummaryrefslogtreecommitdiff
path: root/source/base
diff options
context:
space:
mode:
Diffstat (limited to 'source/base')
-rw-r--r--source/base/stack.d12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/base/stack.d b/source/base/stack.d
index e42ff12..c6e1a59 100644
--- a/source/base/stack.d
+++ b/source/base/stack.d
@@ -32,13 +32,17 @@ Token pop(ref Stack!Token stack) {
return token;
}
-void push(ref Stack!Token stack, Token token) {
- stack.insertFront(token);
-}
-
template push(T)
if ( is(T == int) || is(T == bool) || is (T == string) ) {
void push(ref Stack!Token stack, T value) {
stack.push(Token(value));
}
}
+
+void push(ref Stack!Token stack, Token token) {
+ stack.insertFront(token);
+}
+
+void push(ref Stack!Token stack, Stack!Token prefix) {
+ stack.insertFront(prefix[]);
+}