Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/compilers/Design/Bound Node Design.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Generally speaking, that means that there is an isomorphism between the syntax a
1. Parenthesized expressions do not appear in the bound nodes because they have no semantic meaning.
2. Query expressions are given a semantic meaning by correspondence to a translated form, so the bound nodes may model the translated form.

Default visit order for bound nodes should match order of evaluation, which usually matches lexical order.

### Bound nodes should capture all semantic information embedded in the syntax

A consumer of the bound nodes should not need to examine the syntax from which they were produced to understand the meaning of the bound nodes. All relevant semantic information that comes from the syntax should be summarized in the fields of the bound node. If a consumer of a bound node needs to refer to the syntax to affect the meaning of the code, that is a design smell.
Expand Down