GabrielDosReis / ipr

Compiler-neutral Internal Program Representation for C++
BSD 3-Clause "New" or "Revised" License
222 stars 23 forks source link

`default` is a symbolic value #228

Closed GabrielDosReis closed 2 years ago

GabrielDosReis commented 2 years ago

This patch adds two things:

  1. Labels as symbolic values of type void. Use get_label(lbl) to get the symbolic representation of lbl as a label.

  2. default is a universal defaulter: It can be used as the initializer in a defaulted function definition, or as the default operand to case in a labeled-statement. In both cases, use Lexicon::default_value().