Designing syntax and grammar for a new C# language feature

Syntax and Grammar are the core elements for implementing a new language feature. This section will enable you to define the syntax (nodes and tokens) and grammar for a new C# language feature: Switch operator (?::). For details on the intended functionality of this operator, read the section New language feature: Switch Operator (?::) at the start of this chapter.

Get Roslyn Cookbook 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.