summaryrefslogtreecommitdiff
path: root/src/sp_tree.h
blob: 2659d56e21dcf830b8bb891e957b9a5a8c509a4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef SP_TREE_H
#define SP_TREE_H
#include "php_snuffleupagus.h"

typedef enum {
  UNDEFINED = 0,
  OBJECT,
  ARRAY,
  ARRAY_END,
  INTERPRETED_STRING,
  LITERAL_STRING,
  CLASS,
  VAR,
  CONSTANT
} elem_type;

typedef struct parser_s {
  elem_type type;
  char *value;
  struct parser_s *idx;
  struct parser_s *next;
} sp_tree;

sp_tree *sp_tree_new(void);
void sp_tree_free(sp_tree *);

#endif