ndo
Version:
A Forth/PostScript inspired build tool.
75 lines (59 loc) • 918 B
text/coffeescript
class Objx
constructor:()->
=0
=0
=0
=0
=''
=[]
clone:()->
o=new Objx()
o.typ=
o.rwx=
o.len=
o.pos=
o.nam=
o.val=
return o
isLiteral:()->
return 'Literal'==
isNative:()->
return 'Native'==
isComposite:()->
return 'Array'==
isProcedure:()->
return 'Array'== and 1==(%2)
Objx.EX=1
Objx.newLiteral=(x)->
o=new Objx()
o.typ='Literal'
o.rwx=0
o.len=0
o.pos=0
o.val=x
return o
Objx.newArray=(x)->
o=new Objx()
o.typ='Array'
o.rwx=0
o.len=x.length
o.pos=0
o.val=x
return o
Objx.newNative=(x)->
o=new Objx()
o.typ='Native'
o.rwx=0
o.len=0
o.pos=0
o.val=x
return o
# Objx.newToken=(x)->
# o=new Objx()
# o.typ='Token'
# o.rwx=6
# o.len=x.length
# o.pos=0
# o.val=x
# return o
module.exports={Objx}