Merge pull request #506 from andrewcsmith/patch-2
[supercollider.git] / SCDoc / SCDoc.h
blobd7ccefe16fa36b41d0402078c3305d0c8b189b71
1 #ifndef SCDOC_H
2 #define SCDOC_H
4 #define SCDOC_PARSE_FULL 0
5 #define SCDOC_PARSE_PARTIAL 1
6 #define SCDOC_PARSE_METADATA 2
8 extern const char * NODE_TEXT;
9 extern const char * NODE_NL;
11 typedef struct DocNode {
12 const char *id;
13 char *text;
14 int n_childs;
15 struct DocNode **children;
16 } DocNode;
18 char *strmerge(char *a, char *b);
20 DocNode * doc_node_make_take_children(const char *id, char *text, DocNode *src);
21 DocNode * doc_node_make(const char *id, char *text, DocNode *child);
22 DocNode * doc_node_add_child(DocNode *n, DocNode *child);
23 DocNode * doc_node_create(const char *id);
24 void doc_node_free_tree(DocNode *n);
26 DocNode * scdoc_parse_file(char *fn, int mode);
27 void doc_node_dump(DocNode *n);
29 extern char * scdoc_current_file;
31 #endif