java.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. ===============================================================================
  3. Chili is the jQuery code highlighter plugin
  4. ...............................................................................
  5. LICENSE: http://www.opensource.org/licenses/mit-license.php
  6. WEBSITE: http://noteslog.com/chili/
  7. Copyright 2008 / Andrea Ercolino
  8. ===============================================================================
  9. */
  10. {
  11. _name: "java"
  12. , _case: true
  13. , _main: {
  14. mlcom : {
  15. _match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
  16. , _style: "color: #4040c2;"
  17. }
  18. , com : {
  19. _match: /\/\/.*/
  20. , _style: "color: green;"
  21. }
  22. , string : {
  23. _match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/
  24. , _style: "color: teal;"
  25. }
  26. , number : {
  27. _match: /(?:\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b)|(?:0x[a-f0-9]+)\b/
  28. , _style: "color: red;"
  29. }
  30. , meta : {
  31. _match: /(?!\@interface\b)\@[\$\w]+\b/
  32. , _style: "color: red;"
  33. }
  34. , keyword: {
  35. _match: /\b(?:while|volatile|void|try|true|transient|throws|throw|this|synchronized|switch|super|strictfp|static|short|return|public|protected|private|package|null|new|native|long|interface|int|instanceof|import|implements|if|goto|for|float|finally|final|false|extends|enum|else|double|do|default|continue|const|class|char|catch|case|byte|break|boolean|assert|abstract)\b/
  36. , _style: "color: navy; font-weight: bold;"
  37. }
  38. }
  39. }