Chapter 7Managing Symbol Tables for Data Aggregates

In the previous chapter, we learned the basics about symbol table management. We looked at defining symbols, grouping them into scopes, and organizing those scopes into scope trees. Scope trees are crucial because their structure encodes the rules for looking up symbols. Resolving a symbol means looking for it in the current scope or any scope on the path to the root of the scope tree.

In this chapter, we’re going to learn about another kind of scope called a data aggregate scope. Like any other scope, it contains symbols and has a place within the scope tree. The difference is that code outside of a data aggregate scope can access the members inside using an expression such as user.name. We’re ...

Get Language Implementation Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.