2#error "This header is intended to be used internally as a part of the Gyoji front-end. Please include frontend.hpp instead."
142 const Gyoji::context::TokenID &
get_type()
const;
205 typedef std::variant<
236 FileStatementType statement;
474 bool m_is_expression;
740 ~TypeSpecifierArray();
751 const Terminal & get_literal_int_token()
const;
850 typedef std::variant<
866 const TypeSpecifier::TypeSpecifierType &
get_type()
const;
868 TypeSpecifier::TypeSpecifierType type;
988 InitializerExpression(
991 InitializerExpression(
995 ~InitializerExpression();
996 bool has_expression()
const;
997 const Expression & get_expression()
const;
1131 const Expression & get_expression()
const;
1264 bool has_else()
const;
1265 bool has_else_if()
const;
1315 const ScopeBody & get_scope_body()
const;
1355 bool is_declaration()
const;
1365 const Terminal & get_identifier()
const;
1367 const Expression & get_expression_initial()
const;
1368 const Expression & get_expression_termination()
const;
1369 const Expression & get_expression_increment()
const;
1370 const ScopeBody & get_scope_body()
const;
1372 bool is_declaration_initializer;
1389 StatementSwitchBlock(
1394 StatementSwitchBlock(
1403 ~StatementSwitchBlock();
1404 bool is_default()
const;
1405 const Expression & get_expression();
1406 const ScopeBody & get_scope_body();
1425 ~StatementSwitchContent();
1447 const Expression & get_expression()
const;
1448 const StatementSwitchContent & get_switch_content()
const;
1517 ~StatementContinue();
1543 bool is_void()
const;
1544 const Expression & get_expression()
const;
1554 typedef std::variant<
1569 Statement(StatementType _statement,
const SyntaxNode & _sn);
1574 const StatementType & get_statement()
const;
1576 StatementType statement;
1603 const StatementList & get_statements()
const;
1612 FileStatementFunctionDeclStart(
1618 ~FileStatementFunctionDeclStart();
1620 const AccessModifier & get_access_modifier()
const;
1621 const UnsafeModifier & get_unsafe_modifier()
const;
1622 const TypeSpecifier & get_type_specifier()
const;
1623 const Terminal & get_name()
const;
1633 FileStatementFunctionDefinition(
1643 ~FileStatementFunctionDefinition();
1644 const AccessModifier & get_access_modifier()
const;
1645 const UnsafeModifier & get_unsafe_modifier()
const;
1646 const TypeSpecifier & get_return_type()
const;
1647 const Terminal & get_name()
const;
1648 const FunctionDefinitionArgList & get_arguments()
const;
1649 const ScopeBody & get_scope_body()
const;
1671 bool is_array()
const;
1672 size_t get_size()
const;
1694 const AccessModifier & get_access_modifier()
const;
1698 const ClassArgumentList & get_argument_list()
const;
1713 ~ClassArgumentList();
1726 ClassMemberDeclarationVariable(
1735 ~ClassMemberDeclarationVariable();
1736 const AccessModifier & get_access_modifier()
const;
1737 const TypeSpecifier & get_type_specifier()
const;
1748 ClassMemberDeclarationMethod(
1760 ~ClassMemberDeclarationMethod();
1761 const AccessModifier & get_access_modifier()
const;
1762 const TypeSpecifier & get_type_specifier()
const;
1763 const Terminal & get_identifier()
const;
1764 const FunctionDefinitionArgList & get_arguments()
const;
1776 ClassMemberDeclarationConstructor(
1787 ~ClassMemberDeclarationConstructor();
1788 const AccessModifier & get_access_modifier()
const;
1789 const TypeSpecifier & get_type_specifier()
const;
1790 const FunctionDefinitionArgList & get_arguments()
const;
1801 ClassMemberDeclarationDestructor(
1813 ~ClassMemberDeclarationDestructor();
1814 const AccessModifier & get_access_modifier()
const;
1815 const TypeSpecifier & get_type_specifier()
const;
1816 const FunctionDefinitionArgList & get_arguments()
const;
1829 typedef std::variant<
1839 ClassMemberDeclaration(
1846 ~ClassMemberDeclaration();
1847 const ClassMemberDeclaration::MemberType & get_member();
1858 ~ClassMemberDeclarationList();
1884 const ClassArgumentList & get_argument_list()
const;
1906 const ClassArgumentList & get_argument_list()
const;
1929 const AccessModifier & get_access_modifier()
const;
1932 const TypeSpecifier & get_type_specifier()
const;
1943 EnumDefinitionValue(
1952 ~EnumDefinitionValue();
1955 const Expression & get_expression()
const;
1969 ~EnumDefinitionValueList();
1992 const AccessModifier & get_access_modifier()
const;
1999 const EnumDefinitionValueList & get_value_list()
const;
2018 ~ExpressionPrimaryIdentifier();
2019 const Terminal & get_identifier()
const;
2025 ExpressionPrimaryNested(
2033 ~ExpressionPrimaryNested();
2034 const Expression & get_expression()
const;
2043 ExpressionPrimaryLiteralInt(
2049 ~ExpressionPrimaryLiteralInt();
2054 const Terminal & get_literal_int_token()
const;
2061 ExpressionPrimaryLiteralChar(
2067 ~ExpressionPrimaryLiteralChar();
2075 ExpressionPrimaryLiteralString(
2081 ~ExpressionPrimaryLiteralString();
2091 ExpressionPrimaryLiteralFloat(
2097 ~ExpressionPrimaryLiteralFloat();
2126 ExpressionPrimaryLiteralBool(
2132 ~ExpressionPrimaryLiteralBool();
2138 bool get_value()
const;
2145 ExpressionPrimaryLiteralNull(
2151 ~ExpressionPrimaryLiteralNull();
2158 ExpressionPostfixArrayIndex(
2167 ~ExpressionPostfixArrayIndex();
2168 const Expression & get_array()
const;
2169 const Expression & get_index()
const;
2183 ~ArgumentExpressionList();
2194 ExpressionPostfixFunctionCall(
2203 ~ExpressionPostfixFunctionCall();
2204 const Expression & get_function()
const;
2205 const ArgumentExpressionList & get_arguments()
const;
2215 ExpressionPostfixDot(
2223 ~ExpressionPostfixDot();
2224 const Expression & get_expression()
const;
2225 const Terminal & get_identifier()
const;
2234 ExpressionPostfixArrow(
2242 ~ExpressionPostfixArrow();
2243 const Expression & get_expression()
const;
2244 const Terminal & get_identifier()
const;
2257 ExpressionPostfixIncDec(
2260 ExpressionPostfixIncDec::OperationType _type
2265 ~ExpressionPostfixIncDec();
2266 const ExpressionPostfixIncDec::OperationType & get_type()
const;
2267 const Expression & get_expression()
const;
2269 ExpressionPostfixIncDec::OperationType type;
2286 ExpressionUnaryPrefix(
2289 ExpressionUnaryPrefix::OperationType _type
2294 ~ExpressionUnaryPrefix();
2295 const ExpressionUnaryPrefix::OperationType & get_type()
const;
2297 const Expression & get_expression()
const;
2299 ExpressionUnaryPrefix::OperationType type;
2306 ExpressionUnarySizeofType(
2315 ~ExpressionUnarySizeofType();
2316 const TypeSpecifier & get_type_specifier()
const;
2338 const TypeSpecifier & get_type()
const;
2339 const Expression & get_expression()
const;
2373 COMPARE_GREATER_EQUAL,
2394 ExpressionBinary::OperationType _type
2413 ExpressionBinary::OperationType _type
2418 ~ExpressionBinary();
2419 const Expression & get_a()
const;
2420 const ExpressionBinary::OperationType & get_operator()
const;
2422 const Expression & get_b()
const;
2444 ~ExpressionTrinary();
2445 const Expression & get_condition()
const;
2446 const Expression & get_if()
const;
2447 const Expression & get_else()
const;
2458 typedef std::variant<
2478 Expression(Expression::ExpressionType _expression_type,
const SyntaxNode & _sn);
2483 const Expression::ExpressionType & get_expression()
const;
2485 Expression::ExpressionType expression_type;
2490 GlobalInitializerExpressionPrimary(
2497 ~GlobalInitializerExpressionPrimary();
2498 const Expression & get_expression()
const;
2506 GlobalInitializerAddressofExpressionPrimary(
2514 ~GlobalInitializerAddressofExpressionPrimary();
2515 const Expression & get_expression()
const;
2533 ~StructInitializer();
2534 const GlobalInitializer & get_initializer()
const;
2548 ~StructInitializerList();
2557 GlobalInitializerStructInitializerList(
2567 ~GlobalInitializerStructInitializerList();
2568 const StructInitializerList & get_struct_initializer()
const;
2578 typedef std::variant<
2582 nullptr_t> GlobalInitializerType;
2588 ~GlobalInitializer();
2589 const GlobalInitializerType & get_initializer()
const;
2591 GlobalInitializerType initializer;
2596 FileStatementGlobalDefinition(
2607 ~FileStatementGlobalDefinition();
2608 const AccessModifier & get_access_modifier()
const;
2609 const UnsafeModifier & get_unsafe_modifier()
const;
2610 const TypeSpecifier & get_type_specifier()
const;
2613 const GlobalInitializer & get_global_initializer()
const;
2625 NamespaceDeclaration(
2633 ~NamespaceDeclaration();
2634 const AccessModifier & get_access_modifier()
const;
2635 const Terminal & get_name()
const;
2644 FileStatementNamespace(
2654 ~FileStatementNamespace();
2655 const NamespaceDeclaration & get_declaration()
const;
2656 const FileStatementList & get_statement_list()
const;
2698 ~FileStatementUsing();
2700 const AccessModifier & get_access_modifier()
const;
2703 const UsingAs &get_using_as()
const;
References a location in the source-file.
Definition source-reference.hpp:16
Represents a token read from the input stream.
Definition token-stream.hpp:41
Weakly-typed syntax node.
Definition syntax-node.hpp:55
SyntaxNode(Gyoji::context::TokenID _type, specific_type_t _data, const Gyoji::context::SourceReference &_source_ref)
Definition syntax-node.cpp:8
Entity living inside a namespace.
Definition ns2.hpp:26
Declares PUBLIC, PROTECTED, or PRIVATE access to functions and members.
Definition tree.hpp:307
~AccessModifier()
Definition tree.cpp:143
const AccessModifierType & get_type() const
Definition tree.cpp:146
AccessModifierType
Definition tree.hpp:309
@ PRIVATE
Definition tree.hpp:323
@ PROTECTED
Definition tree.hpp:318
@ PUBLIC
Definition tree.hpp:313
This indicates the type of access that may be permitted as UNSPECIFIED, CONST, or VOLATILE.
Definition tree.hpp:248
~AccessQualifier()
Definition tree.cpp:111
AccessQualifierType
Definition tree.hpp:250
@ CONST
Definition tree.hpp:274
@ VOLATILE
Definition tree.hpp:267
@ UNSPECIFIED
Definition tree.hpp:258
const AccessQualifier::AccessQualifierType & get_type() const
Definition tree.cpp:114
~ClassDeclaration()
Definition tree.cpp:1488
Represents the declaration of a function.
Definition tree.hpp:942
~FileStatementFunctionDeclaration()
Definition tree.cpp:529
const AccessModifier & get_access_modifier() const
Definition tree.cpp:532
const FunctionDefinitionArgList & get_arguments() const
Definition tree.cpp:544
const Terminal & get_name() const
Definition tree.cpp:541
const TypeSpecifier & get_return_type() const
Definition tree.cpp:538
const UnsafeModifier & get_unsafe_modifier() const
Definition tree.cpp:535
~FileStatementList()
Definition tree.cpp:2531
const FileStatementType & get_statement() const
Definition tree.cpp:2515
Represents the list of arguments to a function definition.
Definition tree.hpp:906
void add_argument(Gyoji::owned< FunctionDefinitionArg > _argument)
Definition tree.cpp:456
void add_comma(Gyoji::owned< Terminal > _comma)
Definition tree.cpp:462
~FunctionDefinitionArgList()
Definition tree.cpp:450
const std::vector< Gyoji::owned< FunctionDefinitionArg > > & get_arguments() const
Definition tree.cpp:453
Represents an argument in a function definition.
Definition tree.hpp:879
~FunctionDefinitionArg()
Definition tree.cpp:437
const TypeSpecifier & get_type_specifier() const
Definition tree.cpp:440
const Terminal & get_identifier() const
Definition tree.cpp:443
Represents a block of statements in a particular scope.
Definition tree.hpp:1077
const ScopeBody & get_scope_body() const
Definition tree.cpp:626
const UnsafeModifier & get_unsafe_modifier() const
Definition tree.cpp:623
~StatementBlock()
Definition tree.cpp:620
This represents a statement in a function or scope that computes an expression.
Definition tree.hpp:1121
~StatementExpression()
Definition tree.cpp:640
This represents an if condition in one of several forms.
Definition tree.hpp:1192
const ScopeBody & get_if_scope_body() const
Definition tree.cpp:739
const Expression & get_expression() const
Definition tree.cpp:736
~StatementIfElse()
Definition tree.cpp:727
const StatementIfElse & get_else_if() const
Definition tree.cpp:745
const ScopeBody & get_else_scope_body() const
Definition tree.cpp:742
Represents the declaration of a variable inside the scope of a function or block.
Definition tree.hpp:1018
const Terminal & get_identifier() const
Definition tree.cpp:603
const InitializerExpression & get_initializer_expression() const
Definition tree.cpp:606
const TypeSpecifier & get_type_specifier() const
Definition tree.cpp:600
~StatementVariableDeclaration()
Definition tree.cpp:597
Represents a 'while' statement in a function or scope.
Definition tree.hpp:1295
const Expression & get_expression() const
Definition tree.cpp:771
~StatementWhile()
Definition tree.cpp:768
Represents whitespace, comments, and metadata for the source file.
Definition tree.hpp:30
~TerminalNonSyntax()
Definition tree.cpp:75
Type
Definition tree.hpp:32
@ EXTRA_FILE_METADATA
Definition tree.hpp:54
@ EXTRA_WHITESPACE
Definition tree.hpp:47
@ EXTRA_COMMENT_MULTI_LINE
Definition tree.hpp:42
@ EXTRA_COMMENT_SINGLE_LINE
Definition tree.hpp:37
const std::string & get_data() const
Definition tree.cpp:83
const Type & get_type() const
Definition tree.cpp:78
Represents tokens from the lexer used to represent keywords and identifiers found in the source.
Definition tree.hpp:89
std::string get_fully_qualified_name() const
Definition tree.cpp:32
std::string get_name() const
Definition tree.cpp:40
const std::string & get_value() const
Definition tree.cpp:25
const Gyoji::context::TokenID & get_type() const
Definition tree.cpp:22
IdentifierType
Definition tree.hpp:104
@ IDENTIFIER_GLOBAL_SCOPE
Definition tree.hpp:111
@ IDENTIFIER_UNCATEGORIZED
Definition tree.hpp:125
@ IDENTIFIER_LOCAL_SCOPE
Definition tree.hpp:117
const Gyoji::context::SourceReference & get_terminal_source_ref() const
Definition tree.cpp:28
~Terminal()
Definition tree.cpp:19
Represents the top-level syntax unit for a source file.
Definition tree.hpp:2759
const std::vector< Gyoji::owned< FileStatement > > & get_statements() const
Definition tree.cpp:2557
~TranslationUnit()
Definition tree.cpp:2553
Represents the name of a type.
Definition tree.hpp:417
~TypeName()
Definition tree.cpp:203
bool is_expression() const
Definition tree.cpp:206
std::string get_name() const
Definition tree.cpp:209
const Expression & get_expression() const
Definition tree.cpp:215
Represents arguments to a template type.
Definition tree.hpp:493
~TypeSpecifierCallArgs()
Definition tree.cpp:223
const std::vector< Gyoji::owned< TypeSpecifier > > & get_arguments() const
Definition tree.cpp:240
void add_argument(Gyoji::owned< TypeSpecifier > _argument)
Definition tree.cpp:226
Represents a pointer to a function.
Definition tree.hpp:617
~TypeSpecifierFunctionPointer()
Definition tree.cpp:319
const TypeSpecifier & get_return_type() const
Definition tree.cpp:321
const FunctionDefinitionArgList & get_args() const
Definition tree.cpp:330
const std::string & get_name() const
Definition tree.cpp:324
Represents an unsafe poniter to a specific type.
Definition tree.hpp:694
~TypeSpecifierPointerTo()
Definition tree.cpp:347
const AccessQualifier & get_access_qualifier() const
Definition tree.cpp:353
const TypeSpecifier & get_type_specifier() const
Definition tree.cpp:350
Represents a safe reference to a specific type.
Definition tree.hpp:785
const AccessQualifier & get_access_qualifier() const
Definition tree.cpp:376
~TypeSpecifierReferenceTo()
Definition tree.cpp:370
const TypeSpecifier & get_type_specifier() const
Definition tree.cpp:373
Represents a simple type.
Definition tree.hpp:531
const AccessQualifier & get_access_qualifier() const
Definition tree.cpp:258
const TypeName & get_type_name() const
Definition tree.cpp:261
~TypeSpecifierSimple()
Definition tree.cpp:255
Represents a type with type-arguments modifying the type's definition.
Definition tree.hpp:581
~TypeSpecifierTemplate()
Definition tree.cpp:281
const TypeSpecifierCallArgs & get_args() const
Definition tree.cpp:287
const TypeSpecifier & get_type() const
Definition tree.cpp:284
Represents a type being specified.
Definition tree.hpp:848
~TypeSpecifier()
Definition tree.cpp:419
const TypeSpecifier::TypeSpecifierType & get_type() const
Definition tree.cpp:422
Represents the safety/borrow check semantics for a function or block.
Definition tree.hpp:362
~UnsafeModifier()
Definition tree.cpp:163
bool is_unsafe() const
Definition tree.cpp:166
Strongly-typed syntax tree.
Definition forward.hpp:30