consider:
my const varname = expression
things to notice:
- 'my' and 'const' are right associative, meaning they bind to what's to the
right side of them.
- '=' and 'expression' are left associative
- '=' is the root of the tree
things to think about:
- is 'varname' is right associative, or does its association matter?
- as a tree, how is this laid out? Is it a simple linked list of left/right
values and then one of the nodes in it knows that it's the parent, OR, are
there left/right children, and then links to the parent nodes (in the case
of a binary tree).
- if it is a binary tree (likely), then how are left and right
associations represented on it? Can they be represented in a consistent
way?
- We might consider the tree to be like:
=
|
varname/ \expression
/
const/\(null)
/
my/\(null)