xref: /Universal-ctags/main/promise.h (revision 89a71f3bd1b10d2c6df0cd56e8a1b3db8f308f9e)
1 /*
2  *
3  *  Copyright (c) 2016, Red Hat, Inc.
4  *  Copyright (c) 2016, Masatake YAMATO
5  *
6  *  Author: Masatake YAMATO <yamato@redhat.com>
7  *
8  *   This source code is released for free distribution under the terms of the
9  *   GNU General Public License version 2 or (at your option) any later version.
10  *
11  */
12 #ifndef CTAGS_MAIN_PROMISE_H
13 #define CTAGS_MAIN_PROMISE_H
14 
15 #include "general.h"
16 #include "mio.h"
17 #include "parse.h"
18 #include "numarray.h"
19 
20 /* parser can be NULL; give a name with promiseUpdateLanguage()
21  * when the name can be determined. */
22 int  makePromise   (const char *parser,
23 		    unsigned long startLine, long startCharOffset,
24 		    unsigned long endLine, long endCharOffset,
25 		    unsigned long sourceLineOffset);
26 
27 /* Fill the line with white spaces.
28    The callee takes the ownership of lines. */
29 void promiseAttachLineFiller (int promise, ulongArray *lines);
30 
31 void promiseUpdateLanguage  (int promise, langType lang);
32 
33 #endif	/* CTAGS_MAIN_PROMISE_H */
34