GCC Middle and Back End API Reference
json::literal Class Reference

#include <json.h>

Inheritance diagram for json::literal:
Collaboration diagram for json::literal:

Public Member Functions

 literal (enum kind kind)
 literal (bool value)
enum kind get_kind () const final override
void print (pretty_printer *pp, bool formatted) const final override
void dump (FILE *, bool formatted) const

Private Attributes

enum kind m_kind

Detailed Description

Subclass of value for the three JSON literals "true", "false",
and "null".   

Constructor & Destructor Documentation

◆ literal() [1/2]

json::literal::literal ( enum kind kind)

◆ literal() [2/2]

json::literal::literal ( bool value)

Member Function Documentation

◆ dump()

void value::dump ( FILE * outf,
bool formatted ) const
class json::value.   
Dump this json::value tree to OUTF.

The key/value pairs of json::objects are printed in the order
in which the keys were originally inserted.   

References pp_buffer(), pp_flush(), json::value::print(), and output_buffer::stream.

Referenced by json_output_format::flush_to_file(), sarif_builder::flush_to_file(), and generate_results().

◆ get_kind()

enum kind json::literal::get_kind ( ) const

Implements json::value.

References m_kind.

◆ print()

void literal::print ( pretty_printer * pp,
bool formatted ) const
class json::literal, a subclass of json::value.   
Implementation of json::value::print for json::literal.   

Implements json::value.

References gcc_unreachable, json::JSON_FALSE, json::JSON_NULL, json::JSON_TRUE, m_kind, and pp_string().

Field Documentation

◆ m_kind

enum kind json::literal::m_kind

Referenced by get_kind(), and print().

The documentation for this class was generated from the following files: