Nearly CC
An educational compiler skeleton
Classes | Enumerations
literal_value.h File Reference

Support for working with literal values appearing in source code. More...

#include <cstdint>
#include "location.h"
Include dependency graph for literal_value.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  LiteralValue
 Helper class for representing literal values (integer, character, and string). More...
 

Enumerations

enum class  LiteralValueKind { NONE , INTEGER , CHARACTER , STRING }
 Kinds of literal values.
 

Detailed Description

Support for working with literal values appearing in source code.

The most useful way to create an instance of LiteralValue is to use one of the "`from`" static member functions, which creates a LiteralValue from the lexeme of a token.