#include <iostream>
#include "symbol.hh"
Go to the source code of this file.
Classes | |
class | Node |
Class Node = (type x (int + float + Sym + void*)). More... | |
Enumerations | |
enum | |
Tags used to define the type of a Node. |
Nodes are completly described by the node.h file, there is no node.cpp file.
API:
Node(symbol("abcd")); : node with symbol content Node(10); : node with int content Node(3.14159); : node with float content
n->type(); : kIntNode or kFloatNode or kSymNode
n->getInt(); : int content of n n->getFloat(); : float content of n n->getSym(); : symbol content of n
if (isInt(n, &i)) ... : int i = int content of n if (isFloat(n, &f)) ... : float f = float content of n if (isSym(n, &s)) ... : Sym s = Sym content of n
Definition in file node.hh.