|
| 1 | +/* |
| 2 | + * Generated by ./misc/optlib2c from optlib/nix.ctags, Don't edit this manually. |
| 3 | + */ |
| 4 | +#include "general.h" |
| 5 | +#include "parse.h" |
| 6 | +#include "routines.h" |
| 7 | +#include "field.h" |
| 8 | +#include "xtag.h" |
| 9 | + |
| 10 | + |
| 11 | +static void initializeNixParser (const langType language CTAGS_ATTR_UNUSED) |
| 12 | +{ |
| 13 | +} |
| 14 | + |
| 15 | +extern parserDefinition* NixParser (void) |
| 16 | +{ |
| 17 | + static const char *const extensions [] = { |
| 18 | + "nix", |
| 19 | + NULL |
| 20 | + }; |
| 21 | + |
| 22 | + static const char *const aliases [] = { |
| 23 | + NULL |
| 24 | + }; |
| 25 | + |
| 26 | + static const char *const patterns [] = { |
| 27 | + NULL |
| 28 | + }; |
| 29 | + |
| 30 | + static kindDefinition NixKindTable [] = { |
| 31 | + { |
| 32 | + true, 'p', "package", "package definition", |
| 33 | + }, |
| 34 | + { |
| 35 | + true, 'f', "function", "function definition", |
| 36 | + }, |
| 37 | + { |
| 38 | + true, 'a', "attr", "attribute definition", |
| 39 | + }, |
| 40 | + }; |
| 41 | + static tagRegexTable NixTagRegexTable [] = { |
| 42 | + {"[p?]name\\s*=\\s*\"(\\w+)\"", "\\1", |
| 43 | + "p", NULL, NULL, false}, |
| 44 | + {"(\\S+)\\s*=\\s+\\w+:", "\\1", |
| 45 | + "f", NULL, NULL, false}, |
| 46 | + {"\\s+([a-zA-Z_0-9-]{4,20})\\s*=", "\\1", |
| 47 | + "a", NULL, NULL, false}, |
| 48 | + }; |
| 49 | + |
| 50 | + |
| 51 | + parserDefinition* const def = parserNew ("Nix"); |
| 52 | + |
| 53 | + def->versionCurrent= 0; |
| 54 | + def->versionAge = 0; |
| 55 | + def->enabled = true; |
| 56 | + def->extensions = extensions; |
| 57 | + def->patterns = patterns; |
| 58 | + def->aliases = aliases; |
| 59 | + def->method = METHOD_NOT_CRAFTED|METHOD_REGEX; |
| 60 | + def->kindTable = NixKindTable; |
| 61 | + def->kindCount = ARRAY_SIZE(NixKindTable); |
| 62 | + def->tagRegexTable = NixTagRegexTable; |
| 63 | + def->tagRegexCount = ARRAY_SIZE(NixTagRegexTable); |
| 64 | + def->initialize = initializeNixParser; |
| 65 | + |
| 66 | + return def; |
| 67 | +} |
0 commit comments