main
Last change
on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.4 KB
|
Rev | Line | |
---|
[d24f17c] | 1 | 'use strict'
|
---|
| 2 |
|
---|
| 3 | module.exports = bro
|
---|
| 4 | bro.displayName = 'bro'
|
---|
| 5 | bro.aliases = []
|
---|
| 6 | function bro(Prism) {
|
---|
| 7 | Prism.languages.bro = {
|
---|
| 8 | comment: {
|
---|
| 9 | pattern: /(^|[^\\$])#.*/,
|
---|
| 10 | lookbehind: true,
|
---|
| 11 | inside: {
|
---|
| 12 | italic: /\b(?:FIXME|TODO|XXX)\b/
|
---|
| 13 | }
|
---|
| 14 | },
|
---|
| 15 | string: {
|
---|
| 16 | pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
|
---|
| 17 | greedy: true
|
---|
| 18 | },
|
---|
| 19 | boolean: /\b[TF]\b/,
|
---|
| 20 | function: {
|
---|
| 21 | pattern: /(\b(?:event|function|hook)[ \t]+)\w+(?:::\w+)?/,
|
---|
| 22 | lookbehind: true
|
---|
| 23 | },
|
---|
| 24 | builtin:
|
---|
| 25 | /(?:@(?: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))/,
|
---|
| 26 | constant: {
|
---|
| 27 | pattern: /(\bconst[ \t]+)\w+/i,
|
---|
| 28 | lookbehind: true
|
---|
| 29 | },
|
---|
| 30 | keyword:
|
---|
| 31 | /\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/,
|
---|
| 32 | operator: /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&|\|\|?|\?|\*|\/|~|\^|%/,
|
---|
| 33 | number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
|
---|
| 34 | punctuation: /[{}[\];(),.:]/
|
---|
| 35 | }
|
---|
| 36 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.