add vapi
[roojspacker] / src / roojspacker-1.2.vapi
1 /* roojspacker-1.2.vapi generated by valac 0.36.6, do not modify. */
2
3 namespace JSDOC {
4         [CCode (cheader_filename = "roojspacker-1.2.h")]
5         public class Collapse : JSDOC.TokenStream {
6                 public Collapse (Gee.ArrayList<JSDOC.Token> tokens, JSDOC.Packer pk, string filename);
7         }
8         [CCode (cheader_filename = "roojspacker-1.2.h")]
9         public class DocComment : GLib.Object {
10                 public bool hasTags;
11                 public bool isUserComment;
12                 public static string shared;
13                 public string src;
14                 public Gee.ArrayList<JSDOC.DocTag> tags;
15                 public DocComment (string comment = "");
16                 public Gee.ArrayList<JSDOC.DocTag> getTag (JSDOC.DocTagTitle tagTitle);
17                 public string getTagAsString (JSDOC.DocTagTitle tagTitle);
18                 public static string unwrapComment (string comment);
19         }
20         [CCode (cheader_filename = "roojspacker-1.2.h")]
21         public class DocParser : GLib.Object {
22                 public static string currentSourceFile;
23                 public DocParser ();
24                 public static JSDOC.Symbol addBuiltin (string name);
25                 public static void addSymbol (JSDOC.Symbol symbol);
26                 public static void finish ();
27                 public static void parse (JSDOC.TokenStream ts, string srcFile);
28                 public static JSDOC.SymbolSet symbols ();
29         }
30         [CCode (cheader_filename = "roojspacker-1.2.h")]
31         public class DocTag : GLib.Object {
32                 public string defaultValue;
33                 public string desc;
34                 public bool isOptional;
35                 public string memberOf;
36                 public string name;
37                 public Gee.ArrayList<string> optvalues;
38                 public JSDOC.DocTagTitle title;
39                 public string type;
40                 public DocTag (string in_src);
41                 public string asString ();
42                 public Json.Array optvalue_as_json_array ();
43         }
44         [CCode (cheader_filename = "roojspacker-1.2.h")]
45         public class Identifier : GLib.Object {
46                 public string mungedValue;
47                 public string name;
48                 public int refcount;
49                 public JSDOC.Scope scope;
50                 public bool toMunge;
51                 public Identifier (string name, JSDOC.Scope scope);
52         }
53         [CCode (cheader_filename = "roojspacker-1.2.h")]
54         public class Lang_Class : GLib.Object {
55                 public Lang_Class ();
56                 public bool isBoolean (string str);
57                 public bool isBuiltin (string name);
58                 public bool isHexDec (string str);
59                 public bool isKeyword (string word);
60                 public bool isNewline (string str);
61                 public bool isNewlineC (char str);
62                 public bool isNumber (string str);
63                 public bool isSpace (string str);
64                 public bool isSpaceC (char str);
65                 public bool isWordChar (char c);
66                 public bool isWordString (string str);
67                 public JSDOC.TokenName keyword (string word) throws JSDOC.LangError;
68                 public JSDOC.TokenName? matching (JSDOC.TokenName name) throws JSDOC.LangError;
69                 public string newline (string ch);
70                 public JSDOC.TokenName puncFirstString (char ch);
71                 public JSDOC.TokenName puncString (string ch);
72                 public string whitespace (string ch);
73         }
74         [CCode (cheader_filename = "roojspacker-1.2.h")]
75         public class Packer : GLib.Object {
76                 public enum ResultType {
77                         err,
78                         warn;
79                         public string to_string ();
80                 }
81                 public string activeFile;
82                 public JSDOC.PackerRun config;
83                 public Gee.ArrayList<string> files;
84                 public string outstr;
85                 public Json.Object result;
86                 public Packer (JSDOC.PackerRun config);
87                 public void dumpErrors (JSDOC.Packer.ResultType type);
88                 public bool hasErrors (string fn);
89                 public void loadFile (string f);
90                 public void loadFiles (string[] fs);
91                 public void loadSourceIndex (string in_srcfile);
92                 public void loadSourceIndexes (Gee.ArrayList<string> indexes);
93                 public void logError (JSDOC.Packer.ResultType type, string filename, int line, string message);
94                 public string md5 (string str);
95                 public string pack (string target, string targetDebug = "") throws JSDOC.PackerError;
96                 public string packFile (string str, string fn, string minfile);
97         }
98         [CCode (cheader_filename = "roojspacker-1.2.h")]
99         public class PackerRun : GLib.Application {
100                 public bool opt_clean_cache;
101                 public bool opt_debug;
102                 public string opt_debug_target;
103                 public string opt_doc_ext;
104                 public bool opt_doc_include_private;
105                 public string opt_doc_target;
106                 public string opt_doc_template_dir;
107                 public bool opt_dump_tokens;
108                 public bool opt_keep_whitespace;
109                 public string opt_real_basedir;
110                 public bool opt_skip_scope;
111                 public string opt_target;
112                 public PackerRun ();
113                 public void parseArgs (string[] args);
114                 public void runPack ();
115                 public static JSDOC.PackerRun singleton ();
116         }
117         [CCode (cheader_filename = "roojspacker-1.2.h")]
118         public class Scope : GLib.Object {
119                 public static Gee.ArrayList<string> builtin;
120                 public string ident;
121                 public static string[] ones;
122                 public JSDOC.Scope parent;
123                 public static Gee.ArrayList<string> skips;
124                 public Gee.ArrayList<JSDOC.Scope> subScopes;
125                 public static string[] twos;
126                 public Scope (int braceN, JSDOC.Scope? parent, int startTokN, string lastIdent, JSDOC.Token? token);
127                 public void addHint (string varName, string varType);
128                 public void addToParentScope (string ident);
129                 public JSDOC.Identifier declareIdentifier (string symbol, JSDOC.Token token);
130                 public void dump (string indent = "");
131                 public JSDOC.Identifier? getIdentifier (string symbol, JSDOC.Token token);
132                 public string[] getUsedSymbols ();
133                 public bool isProtectedVar (string ident);
134                 public void munge ();
135                 public void preventMunging ();
136         }
137         [CCode (cheader_filename = "roojspacker-1.2.h")]
138         public class ScopeParser : GLib.Object {
139                 public ScopeParser (JSDOC.TokenStream ts, JSDOC.Packer packer, string filename);
140                 public void buildSymbolTree ();
141                 public void mungeSymboltree ();
142                 public void printWarnings ();
143         }
144         [CCode (cheader_filename = "roojspacker-1.2.h")]
145         public class Symbol : GLib.Object {
146                 public string alias;
147                 public Gee.ArrayList<string> augments;
148                 public Gee.HashMap<string,JSDOC.DocTag> cfgs;
149                 public Gee.ArrayList<string> childClasses;
150                 public JSDOC.DocComment comment;
151                 public string desc;
152                 public Gee.ArrayList<string> inheritsFrom;
153                 public bool isConstant;
154                 public bool isEvent;
155                 public bool isIgnored;
156                 public bool isInner;
157                 public bool isNamespace;
158                 public bool isPrivate;
159                 public bool isStatic;
160                 public string isa;
161                 public string memberOf;
162                 public Gee.ArrayList<JSDOC.Symbol> methods;
163                 public Gee.ArrayList<JSDOC.Symbol> properties;
164                 public static bool regex_init;
165                 public Gee.ArrayList<JSDOC.DocTag> returns;
166                 public static string srcFile;
167                 public Symbol ();
168                 public void addConfig (JSDOC.DocTag docTag);
169                 public void addDocTag (JSDOC.DocTag docTag);
170                 public void addMember (JSDOC.Symbol symbol);
171                 public string asString ();
172                 public Gee.ArrayList<JSDOC.DocTag> configToArray ();
173                 public void inherit (JSDOC.Symbol symbol);
174                 public void initArrays ();
175                 public bool @is (string what);
176                 public bool isBuiltin ();
177                 public bool isaClass ();
178                 public string makeFuncSkel ();
179                 public string makeMethodSkel ();
180                 public Symbol.new_builtin (string name);
181                 public Symbol.new_populate_with_args (string name, Gee.ArrayList<string> @params, string isa, JSDOC.DocComment comment);
182                 public Json.Array paramsToJson ();
183                 public Json.Array returnsToJson ();
184                 public string name { get; }
185                 public Gee.ArrayList<JSDOC.DocTag> @params { get; }
186                 public string private_name { set; }
187         }
188         [CCode (cheader_filename = "roojspacker-1.2.h")]
189         public class SymbolSet : GLib.Object {
190                 public SymbolSet ();
191                 public void addSymbol (JSDOC.Symbol symbol);
192                 public void deleteSymbol (string alias);
193                 public JSDOC.Symbol? getSymbol (string alias);
194                 public bool hasSymbol (string alias);
195                 public static bool isBuiltin (string name);
196                 public Gee.ArrayList<string> keys ();
197                 public void relate ();
198                 public string renameSymbol (string oldName, string newName);
199                 public Gee.ArrayList<JSDOC.Symbol> values ();
200                 public Gee.HashMap<string,JSDOC.Symbol> _index { get; }
201         }
202         [CCode (cheader_filename = "roojspacker-1.2.h")]
203         public class TextStream : GLib.Object {
204                 public TextStream (string text = "");
205                 public char lookC (int n = 0);
206                 public bool lookEOF (int n = 0);
207                 public string lookS (int n = 0);
208                 public char nextC ();
209                 public string nextS (int n = 1);
210         }
211         [CCode (cheader_filename = "roojspacker-1.2.h")]
212         public class TextStreamChar : GLib.Object {
213                 public char c;
214                 public bool eof;
215                 public TextStreamChar (char val, bool eof = false);
216         }
217         [CCode (cheader_filename = "roojspacker-1.2.h")]
218         public class Token : GLib.Object {
219                 public string data;
220                 public int id;
221                 public JSDOC.Identifier identifier;
222                 public Gee.ArrayList<Gee.ArrayList<JSDOC.Token>> items;
223                 public Gee.ArrayList<string> keyseq;
224                 public int line;
225                 public JSDOC.TokenName name;
226                 public string outData;
227                 public string prefix;
228                 public Gee.HashMap<string,JSDOC.TokenKeyMap> props;
229                 public JSDOC.TokenType type;
230                 public Token (string data, JSDOC.TokenType type, JSDOC.TokenName name, int line = -1);
231                 public string asString ();
232                 public void dump (string indent);
233                 public bool isName (JSDOC.TokenName what);
234                 public bool isType (JSDOC.TokenType what);
235                 public string toRaw (int lvl = 0);
236         }
237         [CCode (cheader_filename = "roojspacker-1.2.h")]
238         public class TokenArray : GLib.Object {
239                 public Gee.ArrayList<JSDOC.Token> tokens;
240                 public TokenArray (JSDOC.Packer? packer, JSDOC.TokenReader reader);
241                 public void dump ();
242                 public new JSDOC.Token @get (int i);
243                 public JSDOC.Token? last ();
244                 public JSDOC.Token? lastSym ();
245                 public JSDOC.Token? pop ();
246                 public void push (JSDOC.Token t);
247                 public int length { get; }
248         }
249         [CCode (cheader_filename = "roojspacker-1.2.h")]
250         public class TokenKeyMap : GLib.Object {
251                 public JSDOC.Token key;
252                 public Gee.ArrayList<JSDOC.Token> vals;
253                 public TokenKeyMap ();
254         }
255         [CCode (cheader_filename = "roojspacker-1.2.h")]
256         public class TokenReader : GLib.Object {
257                 public bool collapseWhite;
258                 public string filename;
259                 public bool ignoreBadGrammer;
260                 public bool keepComments;
261                 public bool keepDocs;
262                 public bool keepWhite;
263                 public bool sepIdents;
264                 public TokenReader (JSDOC.Packer? packer);
265                 public int findPuncToken (JSDOC.TokenArray tokens, string data, int n);
266                 public JSDOC.Token? lastSym (JSDOC.TokenArray tokens, int n);
267                 public bool read_dbquote (JSDOC.TextStream stream, JSDOC.TokenArray tokens);
268                 public bool read_hex (JSDOC.TextStream stream, JSDOC.TokenArray tokens);
269                 public bool read_mlcomment (JSDOC.TextStream stream, JSDOC.TokenArray tokens);
270                 public bool read_newline (JSDOC.TextStream stream, JSDOC.TokenArray tokens);
271                 public bool read_numb (JSDOC.TextStream stream, JSDOC.TokenArray tokens);
272                 public bool read_punc (JSDOC.TextStream stream, JSDOC.TokenArray tokens);
273                 public bool read_regx (JSDOC.TextStream stream, JSDOC.TokenArray tokens);
274                 public bool read_slcomment (JSDOC.TextStream stream, JSDOC.TokenArray tokens);
275                 public bool read_snquote (JSDOC.TextStream stream, JSDOC.TokenArray tokens);
276                 public bool read_space (JSDOC.TextStream stream, JSDOC.TokenArray tokens);
277                 public bool read_word (JSDOC.TextStream stream, JSDOC.TokenArray tokens);
278                 public JSDOC.TokenArray tokenize (JSDOC.TextStream stream);
279         }
280         [CCode (cheader_filename = "roojspacker-1.2.h")]
281         public class TokenStream : GLib.Object {
282                 public int cursor;
283                 protected Gee.ArrayList<JSDOC.Token> tokens;
284                 public TokenStream (Gee.ArrayList<JSDOC.Token> tokens);
285                 public Gee.ArrayList<JSDOC.Token> balance (JSDOC.TokenName in_start) throws JSDOC.TokenStreamError;
286                 public void dump (int start, int end);
287                 public void dumpAll (string indent);
288                 public void dumpAllFlat ();
289                 public JSDOC.Token? getMatchingToken (JSDOC.TokenName start, int depth = 0);
290                 public JSDOC.Token? getMatchingTokenEnd (JSDOC.TokenName end);
291                 public JSDOC.Token? look (int n, bool considerWhitespace);
292                 public JSDOC.Token lookAny (int n);
293                 public int lookFor (string data);
294                 public JSDOC.Token lookTok (int n);
295                 public JSDOC.Token? next ();
296                 public Gee.ArrayList<JSDOC.Token>? nextM (int howMany) throws JSDOC.TokenStreamError;
297                 public JSDOC.Token? nextNonSpace ();
298                 public JSDOC.Token? nextTok ();
299                 public void printRange (int start, int end);
300                 public Gee.ArrayList<JSDOC.Token> remaining ();
301                 public void rewind ();
302                 public Gee.ArrayList<JSDOC.Token> toArray ();
303         }
304         [CCode (cheader_filename = "roojspacker-1.2.h")]
305         public class Walker : GLib.Object {
306                 public Walker (JSDOC.TokenStream ts);
307                 public void buildSymbolTree ();
308         }
309         [CCode (cheader_filename = "roojspacker-1.2.h")]
310         public enum DocTagTitle {
311                 NO_VALUE,
312                 PARAM,
313                 PROPERTY,
314                 CFG,
315                 EXAMPLE,
316                 SINGLETON,
317                 AUTHOR,
318                 METHOD,
319                 DESC,
320                 OVERVIEW,
321                 SINCE,
322                 CONSTANT,
323                 VERSION,
324                 DEPRECATED,
325                 SEE,
326                 CLASS,
327                 NAMESPACE,
328                 CONSTRUCTOR,
329                 STATIC,
330                 INNER,
331                 FIELD,
332                 FUNCTION,
333                 EVENT,
334                 NAME,
335                 RETURN,
336                 THROWS,
337                 REQUIRES,
338                 TYPE,
339                 PRIVATE,
340                 IGNORE,
341                 ARGUMENTS,
342                 EXTENDS,
343                 DEFAULT,
344                 MEMBEROF,
345                 PUBLIC,
346                 SCOPE,
347                 SCOPEALIAS
348         }
349         [CCode (cheader_filename = "roojspacker-1.2.h")]
350         public enum ScopeParserMode {
351                 BUILDING_SYMBOL_TREE,
352                 PASS2_SYMBOL_TREE
353         }
354         [CCode (cheader_filename = "roojspacker-1.2.h")]
355         public enum TokenName {
356                 UNKNOWN_TOKEN,
357                 BREAK,
358                 CASE,
359                 CATCH,
360                 CONST,
361                 CONTINUE,
362                 DEFAULT,
363                 DELETE,
364                 DO,
365                 ELSE,
366                 FALSE,
367                 FINALLY,
368                 FOR,
369                 FUNCTION,
370                 IF,
371                 IN,
372                 INSTANCEOF,
373                 NEW,
374                 NULL,
375                 RETURN,
376                 SWITCH,
377                 THIS,
378                 THROW,
379                 TRUE,
380                 TRY,
381                 TYPEOF,
382                 VOID,
383                 WHILE,
384                 WITH,
385                 VAR,
386                 EVAL,
387                 NAME,
388                 MULTI_LINE_COMM,
389                 JSDOC,
390                 SINGLE_LINE_COMM,
391                 SEMICOLON,
392                 COMMA,
393                 HOOK,
394                 COLON,
395                 OR,
396                 AND,
397                 BITWISE_OR,
398                 BITWISE_XOR,
399                 BITWISE_AND,
400                 STRICT_EQ,
401                 EQ,
402                 ASSIGN,
403                 STRICT_NE,
404                 NE,
405                 LSH,
406                 LE,
407                 LT,
408                 URSH,
409                 RSH,
410                 GE,
411                 GT,
412                 INCREMENT,
413                 DECREMENT,
414                 PLUS,
415                 MINUS,
416                 MUL,
417                 DIV,
418                 MOD,
419                 NOT,
420                 BITWISE_NOT,
421                 DOT,
422                 LEFT_BRACE,
423                 RIGHT_BRACE,
424                 LEFT_CURLY,
425                 RIGHT_CURLY,
426                 LEFT_PAREN,
427                 RIGHT_PAREN,
428                 SPACE,
429                 NEWLINE,
430                 DOUBLE_QUOTE,
431                 SINGLE_QUOTE,
432                 OCTAL,
433                 DECIMAL,
434                 HEX_DEC,
435                 REGX,
436                 START_OF_STREAM,
437                 END_OF_STREAM,
438                 UNKNOWN
439         }
440         [CCode (cheader_filename = "roojspacker-1.2.h")]
441         public enum TokenType {
442                 TOKN,
443                 KEYW,
444                 NAME,
445                 COMM,
446                 PUNC,
447                 WHIT,
448                 STRN,
449                 NUMB,
450                 REGX,
451                 VOID
452         }
453         [CCode (cheader_filename = "roojspacker-1.2.h")]
454         public errordomain CompressWhiteError {
455                 BRACE
456         }
457         [CCode (cheader_filename = "roojspacker-1.2.h")]
458         public errordomain LangError {
459                 ArgumentError
460         }
461         [CCode (cheader_filename = "roojspacker-1.2.h")]
462         public errordomain PackerError {
463                 ArgumentError
464         }
465         [CCode (cheader_filename = "roojspacker-1.2.h")]
466         public errordomain TokenReader_Error {
467                 ArgumentError,
468                 SyntaxError
469         }
470         [CCode (cheader_filename = "roojspacker-1.2.h")]
471         public errordomain TokenStreamError {
472                 ArgumentError
473         }
474         [CCode (cheader_filename = "roojspacker-1.2.h")]
475         public static JSDOC.Lang_Class Lang;
476         [CCode (cheader_filename = "roojspacker-1.2.h")]
477         public static int Scope_gid;
478         [CCode (cheader_filename = "roojspacker-1.2.h")]
479         public static string CompressWhite (JSDOC.TokenStream ts, JSDOC.Packer packer, bool keepWhite);
480 }