next up previous index
Next: Inheritance Up: User guide Previous: Automatic type conversions

The object model

RainCode operates on parse trees. These parse trees are made of nodes, and depending on the kind of node, depending on the piece of source code the node is supposed to represent, the nodes will be different.

Quite understandably, a node that represents a COBOL IF statement will differ from a node representing a function declaration in a C parse tree. It will hold different pieces of information.

Each of these nodes has a number of features that can be consulted. For instance, when dealing with a COBOL IF statement, the condition that is being tested, the statement list to execute if the condition evaluates to TRUE as well as the optional statement list to execute if the condition does not evaluate to TRUE can be consulted as features.

Each node in a parse tree is attached to a class, and this class identifies the list of features that can be consulted for every node of that class.