Advertisement
Guest User

Untitled

a guest
May 25th, 2015
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. //WTFPL licensed
  2. dp.sh.Brushes.Erlang = function()
  3. {
  4. var keywords = 'after begin case catch cond end fun if let of query receive when '+
  5. 'define record export import include include_lib ifdef ifndef else endif undef '+
  6. 'apply attribute call do in letrec module primop try';
  7.  
  8. this.regexList = [
  9. { regex: new RegExp('%.*$', 'gm'), css: 'comment' }, // one line comments
  10. { regex: dp.sh.RegexLib.DoubleQuotedString, css: 'string' }, // strings
  11. { regex: new RegExp(this.GetKeywords(keywords), 'g'), css: 'keyword' }, // Erlang keyword
  12. { regex: new RegExp('_?[A-Z]\\w*', 'g'), css: 'values'},
  13. { regex: new RegExp('\\w+/\\d+', 'g'), css: 'funs'} // NO trailing comma
  14. ];
  15.  
  16. this.CssClass = 'dp-erl';
  17. this.Style = '.dp-erl .values { color: #c88; font-weight: bold;} '+
  18. '.dp-erl .funs { color: #f00; } ';
  19. }
  20.  
  21. dp.sh.Brushes.Erlang.prototype = new dp.sh.Highlighter();
  22. dp.sh.Brushes.Erlang.Aliases = ['erlang', 'erl'];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement