Slowly getting to grips with this.
authorTim Vaughan <tgvaughan@gmail.com>
Sat, 9 Apr 2016 10:43:24 +0000 (22:43 +1200)
committerTim Vaughan <tgvaughan@gmail.com>
Sat, 9 Apr 2016 10:43:24 +0000 (22:43 +1200)
src/forth.jl

index ca57e87..0aa33d7 100644 (file)
@@ -4,13 +4,17 @@ RS = Array{Int64, 1}()
 DS = Array{Int64, 1}()
 
 primitives = Array{Expr,1}()
+memory = Array{Int,1}()
+headers = Array{Tuple{AbstractString, Int},1}
 
-
-
-type Definition
-    name::AbstractString
-    data::Array{Int64,1}
+function addPrim(name::AbstractString, expr::Expr)
+    push!(primitives, expr)
+    push!(memory, -length(primitives))
+    push!(headers, length(memory))
 end
 
+addPrim("docol", :(begin
+
+end))
 
 end