repo.or.cz
/
lispp.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Doesn't compile yet. Working on it.
[lispp.git]
/
LispCons.h
blob
24f344f5ce39d45a8f926772ddc652eb51ec11ec
1
#if !defined(H_LISPCONS)
2
#define H_LISPCONS
3
4
#include
"LispNil.h"
5
#include <utility>
6
7
namespace
Lisp
8
{
9
10
struct
Cons
:
public
LispObj
11
{
12
13
void
make
(
PointerType car
,
PointerType cdr
)
14
{
15
object
.
tag
.
setType
(
eConsObj
);
16
object
.
resize
(
2
);
17
object
[
0
] =
car
;
18
object
[
1
] =
cdr
;
19
}
20
21
PointerType
car
()
22
{
23
return
object
[
0
];
24
}
25
26
27
PointerType
cdr
()
28
{
29
return
object
[
1
];
30
}
31
};
32
33
34
}
35
36
#endif
37