delphi.js 1.8 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: "pas"
  12. , _case: true
  13. , _main: {
  14. mlcom: {
  15. _match: /(?:\(\*[\w\W]*?\*\))|(?:{(?!\$)[\w\W]*?})/
  16. , _style: "color: #4040c2;"
  17. }
  18. , com: {
  19. _match: /\/\/.*/
  20. , _style: "color: green;"
  21. }
  22. , string: {
  23. _match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')/
  24. , _style: "color: teal;"
  25. }
  26. , number: {
  27. _match: /(?:\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b)|(?:\$[a-zA-Z0-9]+\b)/
  28. , _style: "color: red;"
  29. }
  30. , direct: {
  31. _match: /\{\$[a-zA-Z]+ .+\}/
  32. , _style: "color: red;"
  33. }
  34. , keyword: {
  35. _match: /\b(?:abs|addr|and|ansichar|ansistring|array|as|asm|begin|boolean|byte|cardinal|case|char|class|comp|const|constructor|currency|destructor|div|do|double|downto|else|end|except|exports|extended|false|file|finalization|finally|for|function|goto|if|implementation|in|inherited|initialization|int64|integer|interface|is|label|library|longint|longword|mod|nil|not|object|of|on|or|packed|pansichar|pansistring|pchar|pcurrency|pdatetime|pextended|pint64|pointer|private|procedure|program|property|protected|pshortstring|pstring|public|published|pvariant|pwidechar|pwidestring|raise|real|real48|record|repeat|set|shl|shortint|shortstring|shr|single|smallint|string|then|threadvar|to|true|try|type|unit|until|uses|val|var|varirnt|while|widechar|widestring|with|word|write|writeln|xor)\b/
  36. , _style: "color: navy; font-weight: bold;"
  37. }
  38. }
  39. }