summaryrefslogtreecommitdiffstats
path: root/public/prism/prism-t4-vb.js
blob: 7571b112a963dcce9449e8532ebe615d36a4c4e3 (plain)
1
Prism.languages['t4-vb'] = Prism.languages['t4-templating'].createT4('vbnet');
/ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
Prism.languages.bro = {
  comment: {
    pattern: /(^|[^\\$])#.*/,
    lookbehind: true,
    inside: {
      italic: /\b(?:FIXME|TODO|XXX)\b/,
    },
  },

  string: {
    pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
    greedy: true,
  },

  boolean: /\b[TF]\b/,

  function: {
    pattern: /(\b(?:event|function|hook)[ \t]+)\w+(?:::\w+)?/,
    lookbehind: true,
  },

  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))/,

  constant: {
    pattern: /(\bconst[ \t]+)\w+/i,
    lookbehind: true,
  },

  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/,

  operator: /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&|\|\|?|\?|\*|\/|~|\^|%/,

  number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,

  punctuation: /[{}[\];(),.:]/,
};