KCC - Kayte C Compiler 1.10.0
A C compiler implementation with preprocessor, lexer, parser, and code generator
Loading...
Searching...
No Matches
ASTNode Struct Reference

AST Node structure. More...

#include <types.h>

Data Fields

ASTNodeType type
DataType data_type
int line
int column
union { 
   struct { 
      struct ASTNode **   declarations 
      int   declaration_count 
   }   program
   struct { 
      DataType   return_type 
      char *   name 
      struct ASTNode **   parameters 
      int   parameter_count 
      struct ASTNode *   body 
   }   function_decl
   struct { 
      DataType   var_type 
      char *   name 
      struct ASTNode *   initializer 
   }   var_decl
   struct { 
      DataType   param_type 
      char *   name 
   }   parameter
   struct { 
      struct ASTNode **   statements 
      int   statement_count 
   }   compound_stmt
   struct { 
      struct ASTNode *   expression 
   }   expression_stmt
   struct { 
      struct ASTNode *   expression 
   }   return_stmt
   struct { 
      struct ASTNode *   condition 
      struct ASTNode *   then_stmt 
      struct ASTNode *   else_stmt 
   }   if_stmt
   struct { 
      struct ASTNode *   condition 
      struct ASTNode *   body 
   }   while_stmt
   struct { 
      struct ASTNode *   init 
      struct ASTNode *   condition 
      struct ASTNode *   update 
      struct ASTNode *   body 
   }   for_stmt
   struct { 
      TokenType   operator 
      struct ASTNode *   left 
      struct ASTNode *   right 
   }   binary_expr
   struct { 
      TokenType   operator 
      struct ASTNode *   operand 
   }   unary_expr
   struct { 
      char *   function_name 
      struct ASTNode **   arguments 
      int   argument_count 
   }   call_expr
   struct { 
      char *   name 
   }   identifier
   struct { 
      int   value 
   }   number
   struct { 
      char *   value 
   }   string
   struct { 
      char *   variable 
      struct ASTNode *   value 
   }   assignment
   struct { 
      char *   class_name 
      char *   superclass_name 
      struct ASTNode **   protocols 
      int   protocol_count 
      struct ASTNode **   methods 
      int   method_count 
      struct ASTNode **   properties 
      int   property_count 
   }   objc_interface
   struct { 
      char *   class_name 
      char *   category_name 
      struct ASTNode **   methods 
      int   method_count 
      struct ASTNode **   ivars 
      int   ivar_count 
   }   objc_implementation
   struct { 
      ObjCMethodType   method_type 
      DataType   return_type 
      char *   selector 
      ObjCMethodParam *   params 
      int   param_count 
      struct ASTNode *   body 
   }   objc_method
   struct { 
      struct ASTNode *   receiver 
      char *   selector 
      struct ASTNode **   arguments 
      int   argument_count 
   }   objc_message
   struct { 
      DataType   property_type 
      char *   property_name 
      ObjCPropertyAttributes   attributes 
      char *   getter_name 
      char *   setter_name 
   }   objc_property
   struct { 
      char *   protocol_name 
      struct ASTNode **   methods 
      int   method_count 
      struct ASTNode **   properties 
      int   property_count 
   }   objc_protocol
   struct { 
      char *   value 
   }   objc_string
   struct { 
      char *   selector_name 
   }   objc_selector
   struct { 
      bool   value 
   }   objc_boolean
data

Detailed Description

AST Node structure.

Main AST node structure supporting both C and Objective-C constructs.

Definition at line 333 of file types.h.

Field Documentation

◆ argument_count

int ASTNode::argument_count

Definition at line 409 of file types.h.

◆ arguments

struct ASTNode** ASTNode::arguments

Definition at line 408 of file types.h.

◆ attributes

ObjCPropertyAttributes ASTNode::attributes

Definition at line 469 of file types.h.

◆ body

struct ASTNode* ASTNode::body

Definition at line 350 of file types.h.

◆ category_name

char* ASTNode::category_name

Definition at line 443 of file types.h.

◆ class_name

char* ASTNode::class_name

Definition at line 431 of file types.h.

◆ column

int ASTNode::column

Definition at line 337 of file types.h.

◆ condition

struct ASTNode* ASTNode::condition

Definition at line 378 of file types.h.

◆ data_type

DataType ASTNode::data_type

Definition at line 335 of file types.h.

◆ declaration_count

int ASTNode::declaration_count

Definition at line 342 of file types.h.

◆ declarations

struct ASTNode** ASTNode::declarations

Definition at line 341 of file types.h.

◆ else_stmt

struct ASTNode* ASTNode::else_stmt

Definition at line 380 of file types.h.

◆ expression

struct ASTNode* ASTNode::expression

Definition at line 370 of file types.h.

◆ function_name

char* ASTNode::function_name

Definition at line 407 of file types.h.

◆ getter_name

char* ASTNode::getter_name

Definition at line 470 of file types.h.

◆ init

struct ASTNode* ASTNode::init

Definition at line 389 of file types.h.

◆ initializer

struct ASTNode* ASTNode::initializer

Definition at line 356 of file types.h.

◆ ivar_count

int ASTNode::ivar_count

Definition at line 447 of file types.h.

◆ ivars

struct ASTNode** ASTNode::ivars

Definition at line 446 of file types.h.

◆ left

struct ASTNode* ASTNode::left

Definition at line 397 of file types.h.

◆ line

int ASTNode::line

Definition at line 336 of file types.h.

◆ method_count

int ASTNode::method_count

Definition at line 436 of file types.h.

◆ method_type

ObjCMethodType ASTNode::method_type

Definition at line 451 of file types.h.

◆ methods

struct ASTNode** ASTNode::methods

Definition at line 435 of file types.h.

◆ name

char* ASTNode::name

Definition at line 347 of file types.h.

◆ operand

struct ASTNode* ASTNode::operand

Definition at line 403 of file types.h.

◆ operator

TokenType ASTNode::operator

Definition at line 396 of file types.h.

◆ param_count

int ASTNode::param_count

Definition at line 455 of file types.h.

◆ param_type

DataType ASTNode::param_type

Definition at line 360 of file types.h.

◆ parameter_count

int ASTNode::parameter_count

Definition at line 349 of file types.h.

◆ parameters

struct ASTNode** ASTNode::parameters

Definition at line 348 of file types.h.

◆ params

ObjCMethodParam* ASTNode::params

Definition at line 454 of file types.h.

◆ properties

struct ASTNode** ASTNode::properties

Definition at line 437 of file types.h.

◆ property_count

int ASTNode::property_count

Definition at line 438 of file types.h.

◆ property_name

char* ASTNode::property_name

Definition at line 468 of file types.h.

◆ property_type

DataType ASTNode::property_type

Definition at line 467 of file types.h.

◆ protocol_count

int ASTNode::protocol_count

Definition at line 434 of file types.h.

◆ protocol_name

char* ASTNode::protocol_name

Definition at line 475 of file types.h.

◆ protocols

struct ASTNode** ASTNode::protocols

Definition at line 433 of file types.h.

◆ receiver

struct ASTNode* ASTNode::receiver

Definition at line 460 of file types.h.

◆ return_type

DataType ASTNode::return_type

Definition at line 346 of file types.h.

◆ right

struct ASTNode* ASTNode::right

Definition at line 398 of file types.h.

◆ selector

char* ASTNode::selector

Definition at line 453 of file types.h.

◆ selector_name

char* ASTNode::selector_name

Definition at line 487 of file types.h.

◆ setter_name

char* ASTNode::setter_name

Definition at line 471 of file types.h.

◆ statement_count

int ASTNode::statement_count

Definition at line 366 of file types.h.

◆ statements

struct ASTNode** ASTNode::statements

Definition at line 365 of file types.h.

◆ superclass_name

char* ASTNode::superclass_name

Definition at line 432 of file types.h.

◆ then_stmt

struct ASTNode* ASTNode::then_stmt

Definition at line 379 of file types.h.

◆ type

ASTNodeType ASTNode::type

Definition at line 334 of file types.h.

◆ update

struct ASTNode* ASTNode::update

Definition at line 391 of file types.h.

◆ value [1/4]

int ASTNode::value

Definition at line 417 of file types.h.

◆ value [2/4]

char* ASTNode::value

Definition at line 421 of file types.h.

◆ value [3/4]

struct ASTNode* ASTNode::value

Definition at line 426 of file types.h.

◆ value [4/4]

bool ASTNode::value

Definition at line 491 of file types.h.

◆ var_type

DataType ASTNode::var_type

Definition at line 354 of file types.h.

◆ variable

char* ASTNode::variable

Definition at line 425 of file types.h.


The documentation for this struct was generated from the following file: