Summary

In this chapter we described scoping, which is the main mechanism behind visibility and cross-reference resolution. In particular, scoping and typing are often strictly connected and interdependent especially for object-oriented languages. We described both local and global scoping and we showed how to customize these mechanisms using the SmallJava DSL as a case study.

In the next chapter we will show how you can create a p2 repository for your DSL implementation; this way, other users can easily install it in Eclipse. Xtext provides a wizard that creates the entire infrastructure to build a p2 repository with Buckminster, an Eclipse project for automatic building.

Get Implementing Domain-Specific Languages with Xtext and Xtend 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.