Gyoji Compiler
Loading...
Searching...
No Matches
src
cmdline
jformat-tree.hpp
1
#pragma once
2
3
#include <gyoji-frontend.hpp>
4
5
namespace
Gyoji::cmdline {
6
using namespace
Gyoji::context
;
7
using namespace
Gyoji::frontend::ast
;
8
using namespace
Gyoji::frontend::tree
;
14
class
JFormatTree
{
15
public
:
16
JFormatTree
();
17
~JFormatTree
();
18
int
process(
const
SyntaxNode
& file);
19
private
:
20
int
indent;
21
std::map<TokenID, std::string>
token_map;
22
23
std::string
get_token_name(TokenID token)
const
;
24
25
void
print_non_syntax(
const
TerminalNonSyntax
& non_syntax);
26
void
print_indent(
void
);
27
void
print_comment_multi_line(
const
TerminalNonSyntax
& node);
28
void
print_comment_single_line(
const
TerminalNonSyntax
& node);
29
void
print_whitespace(
const
TerminalNonSyntax
& node);
30
void
print_file_metadata(
const
TerminalNonSyntax
& node);
31
32
33
};
34
35
};
std::basic_string
std::map
Gyoji::cmdline::JFormatTree
Definition
jformat-tree.hpp:14
Gyoji::frontend::ast::SyntaxNode
Weakly-typed syntax node.
Definition
syntax-node.hpp:55
Gyoji::frontend::tree::TerminalNonSyntax
Represents whitespace, comments, and metadata for the source file.
Definition
tree.hpp:30
Gyoji::context
The context namespace deals with objects that should last the entire scope of compilation.
Definition
gyoji-context.hpp:16
Gyoji::frontend::ast
Abstract syntax tree.
Definition
syntax-node.hpp:22
Gyoji::frontend::tree
Strongly-typed syntax tree.
Definition
forward.hpp:30
Generated by
1.9.8