libmya 0.1.0
Library to parse Mya language.
Loading...
Searching...
No Matches
ast.h File Reference
#include "types/token.h"
Include dependency graph for ast.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ast_node
 

Macros

#define AST_INITIAL_CHILDREN_LENGTH   5
 
#define AST_CHILDREN_LENGTH_INCREMENT   20
 

Typedefs

typedef enum node_type node_type_t
 
typedef struct ast_node ast_node_t
 

Enumerations

enum  node_type {
  NT_ARG_LIST ,
  NT_BITFIELD_BODY ,
  NT_EXPRESSION ,
  NT_IDENTIFIER ,
  NT_INST_BODY ,
  NT_ROOT ,
  NT_SIZE_SPEC ,
  NT_STATEMENT ,
  NT_STRING ,
  NT_TYPE
}
 

Variables

const char * mya_node_types []
 

Macro Definition Documentation

◆ AST_CHILDREN_LENGTH_INCREMENT

#define AST_CHILDREN_LENGTH_INCREMENT   20

Definition at line 6 of file ast.h.

◆ AST_INITIAL_CHILDREN_LENGTH

#define AST_INITIAL_CHILDREN_LENGTH   5

Definition at line 5 of file ast.h.

Typedef Documentation

◆ ast_node_t

typedef struct ast_node ast_node_t

◆ node_type_t

typedef enum node_type node_type_t

Enumeration Type Documentation

◆ node_type

enum node_type
Enumerator
NT_ARG_LIST 
NT_BITFIELD_BODY 
NT_EXPRESSION 
NT_IDENTIFIER 
NT_INST_BODY 
NT_ROOT 
NT_SIZE_SPEC 
NT_STATEMENT 
NT_STRING 
NT_TYPE 

Definition at line 8 of file ast.h.

9{
15 NT_ROOT,
19 NT_TYPE,
enum node_type node_type_t
@ NT_STRING
Definition ast.h:18
@ NT_TYPE
Definition ast.h:19
@ NT_SIZE_SPEC
Definition ast.h:16
@ NT_INST_BODY
Definition ast.h:14
@ NT_IDENTIFIER
Definition ast.h:13
@ NT_STATEMENT
Definition ast.h:17
@ NT_EXPRESSION
Definition ast.h:12
@ NT_ROOT
Definition ast.h:15
@ NT_ARG_LIST
Definition ast.h:10
@ NT_BITFIELD_BODY
Definition ast.h:11

Variable Documentation

◆ mya_node_types

const char* mya_node_types[]
extern

Definition at line 57 of file globals.c.

57 {
58 [NT_ARG_LIST] = "argument_list",
59 // clang-format hates me.
60 [NT_BITFIELD_BODY] = "bitfield_body",
61 [NT_EXPRESSION] = "expression",
62 [NT_IDENTIFIER] = "identifier",
63 [NT_INST_BODY] = "inst_body",
64 [NT_ROOT] = "root",
65 [NT_SIZE_SPEC] = "size_spec",
66 [NT_STATEMENT] = "statement",
67 [NT_STRING] = "string",
68 [NT_TYPE] = "type_name",
69 NULL,
70};