ICG 2
Electric Boogaloo
Classes | Enumerations | Functions
JClang Namespace Reference

Classes

class  Scope
 Keep track of the namespace scope that we're in. More...
 

Enumerations

enum  NodeKind {
  ClassDecl , FieldDecl , NamespaceDecl , ClassTemplateDecl ,
  ClassTemplateSpecialization , TemplateParameterDecl , TemplateArgument , UsingDecl ,
  TypedefDecl , Unknown
}
 

Functions

NodeKind getNodeKind (json &node)
 Get the kind of a node. More...
 
std::string getQualifiedType (json &node)
 Get the Qualified Type of the field. More...
 
std::vector< std::string > getBaseClasses (json &class_node)
 Get the base classes of a class declaration. More...
 
std::string getNodeName (json &node)
 Get the name of the given node. More...
 
jsongetNodeInner (json &node)
 Get a reference to the json node representing a list of what's inside this node. More...
 
ASTInfo traverseAST (json &ast)
 Traverse the AST and pull out relevant information. More...
 
ASTInfo scrape_ast (json &ast_node, Scope &scope)
 Process this node of the AST as a top level AST. More...
 
ASTInfo scrape_class_info (json &class_node, Scope &scope)
 Process this node of the AST as a class declaration. More...
 
ASTInfo scrape_class_template_decl_info (json &class_template_node, Scope &scope)
 Process this node of the AST as a class template declaration. More...
 
ASTInfo scrape_class_template_spec_info (json &class_template_node, Scope &scope)
 Process this node of the AST as a class template specialization. More...
 
ASTInfo scrape_typedef_info (json &typedef_node, Scope &scope)
 Process this node of the AST as a class template specialization. More...
 
FieldInfo scrape_field_decl_info (json &field_node, Scope &scope)
 Process this node of the AST as a field declaration. More...
 

Enumeration Type Documentation

◆ NodeKind

Enumerator
ClassDecl 
FieldDecl 
NamespaceDecl 
ClassTemplateDecl 
ClassTemplateSpecialization 
TemplateParameterDecl 
TemplateArgument 
UsingDecl 
TypedefDecl 
Unknown 

Function Documentation

◆ getBaseClasses()

std::vector< std::string > JClang::getBaseClasses ( json class_node)

Get the base classes of a class declaration.

Parameters
class_nodejson node that represents a class declaration
Returns
std::vector<std::string> string names of parent classes

◆ getNodeInner()

json & JClang::getNodeInner ( json node)

Get a reference to the json node representing a list of what's inside this node.

Parameters
node
Returns
json&

◆ getNodeKind()

NodeKind JClang::getNodeKind ( json node)

Get the kind of a node.

Parameters
nodenode of json AST
Returns
NodeKind enum of node type

◆ getNodeName()

std::string JClang::getNodeName ( json node)

Get the name of the given node.

Parameters
nodejson node that represents something that has a name
Returns
std::string string representation of name, empty string if node has no name

◆ getQualifiedType()

std::string JClang::getQualifiedType ( json node)

Get the Qualified Type of the field.

Parameters
nodejson node that represents something that has a type
Returns
std::string fully qualified type

◆ scrape_ast()

ASTInfo JClang::scrape_ast ( json ast_node,
Scope scope 
)

Process this node of the AST as a top level AST.

Parameters
ast_nodenode to process
scopecurrent scope object
Returns
ASTInfo info scraped from this node and child nodes

◆ scrape_class_info()

ASTInfo JClang::scrape_class_info ( json class_node,
Scope scope 
)

Process this node of the AST as a class declaration.

Parameters
class_nodenode to process
scopecurrent scope object
Returns
ASTInfo info scraped from this node and child nodes

◆ scrape_class_template_decl_info()

ASTInfo JClang::scrape_class_template_decl_info ( json class_template_node,
Scope scope 
)

Process this node of the AST as a class template declaration.

Parameters
class_template_nodenode to process
scopecurrent scope object
Returns
ASTInfo info scraped from this node and child nodes

◆ scrape_class_template_spec_info()

ASTInfo JClang::scrape_class_template_spec_info ( json class_template_node,
Scope scope 
)

Process this node of the AST as a class template specialization.

Parameters
class_template_nodenode to process
scopecurrent scope object
Returns
ASTInfo info scraped from this node and child nodes

◆ scrape_field_decl_info()

FieldInfo JClang::scrape_field_decl_info ( json field_node,
Scope scope 
)

Process this node of the AST as a field declaration.

Parameters
field_nodenode to process
scopecurrent scope object
Returns
FieldInfo info scraped from this field

◆ scrape_typedef_info()

ASTInfo JClang::scrape_typedef_info ( json typedef_node,
Scope scope 
)

Process this node of the AST as a class template specialization.

Parameters
class_template_nodenode to process
scopecurrent scope object
Returns
ASTInfo info scraped from this node and child nodes

◆ traverseAST()

ASTInfo JClang::traverseAST ( json ast)

Traverse the AST and pull out relevant information.

Parameters
astTop level AST
Returns
ASTInfo Information that we scraped out of it