Slowly getting to grips with this.
[forth.jl.git] / 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