main
Last change
on this file since 65b6638 was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.2 KB
|
Rev | Line | |
---|
[d24f17c] | 1 | Prism.languages.bro = {
|
---|
| 2 |
|
---|
| 3 | 'comment': {
|
---|
| 4 | pattern: /(^|[^\\$])#.*/,
|
---|
| 5 | lookbehind: true,
|
---|
| 6 | inside: {
|
---|
| 7 | 'italic': /\b(?:FIXME|TODO|XXX)\b/
|
---|
| 8 | }
|
---|
| 9 | },
|
---|
| 10 |
|
---|
| 11 | 'string': {
|
---|
| 12 | pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
|
---|
| 13 | greedy: true
|
---|
| 14 | },
|
---|
| 15 |
|
---|
| 16 | 'boolean': /\b[TF]\b/,
|
---|
| 17 |
|
---|
| 18 | 'function': {
|
---|
| 19 | pattern: /(\b(?:event|function|hook)[ \t]+)\w+(?:::\w+)?/,
|
---|
| 20 | lookbehind: true
|
---|
| 21 | },
|
---|
| 22 |
|
---|
| 23 | 'builtin': /(?:@(?:load(?:-(?:plugin|sigs))?|unload|prefixes|ifn?def|else|(?:end)?if|DIR|FILENAME))|(?:&?(?:add_func|create_expire|default|delete_func|encrypt|error_handler|expire_func|group|log|mergeable|optional|persistent|priority|raw_output|read_expire|redef|rotate_interval|rotate_size|synchronized|type_column|write_expire))/,
|
---|
| 24 |
|
---|
| 25 | 'constant': {
|
---|
| 26 | pattern: /(\bconst[ \t]+)\w+/i,
|
---|
| 27 | lookbehind: true
|
---|
| 28 | },
|
---|
| 29 |
|
---|
| 30 | 'keyword': /\b(?:add|addr|alarm|any|bool|break|const|continue|count|delete|double|else|enum|event|export|file|for|function|global|hook|if|in|int|interval|local|module|next|of|opaque|pattern|port|print|record|return|schedule|set|string|subnet|table|time|timeout|using|vector|when)\b/,
|
---|
| 31 |
|
---|
| 32 | 'operator': /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&|\|\|?|\?|\*|\/|~|\^|%/,
|
---|
| 33 |
|
---|
| 34 | 'number': /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
|
---|
| 35 |
|
---|
| 36 | 'punctuation': /[{}[\];(),.:]/
|
---|
| 37 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.