squirrel.lang 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE language SYSTEM "language.dtd">
  3. <language _name="Squirrel" version="1.0" _section="Sources" mimetypes="text/x-squirrel">
  4. <escape-char>\</escape-char>
  5. <line-comment _name = "Line Comment" style= "Comment">
  6. <start-regex>//</start-regex>
  7. </line-comment>
  8. <block-comment _name = "Block Comment" style = "Comment">
  9. <start-regex>/\*</start-regex>
  10. <end-regex>\*/</end-regex>
  11. </block-comment>
  12. <string _name = "String" style = "String" end-at-line-end = "TRUE">
  13. <start-regex>&quot;</start-regex>
  14. <end-regex>&quot;</end-regex>
  15. </string>
  16. <keyword-list _name = "Keywords" style = "Keyword" case-sensitive="TRUE">
  17. <!--
  18. if you plan to update this take the keywords from sqlexer.cpp,
  19. the docu is incomplete
  20. -->
  21. <keyword>break</keyword>
  22. <keyword>case</keyword>
  23. <keyword>catch</keyword>
  24. <keyword>class</keyword>
  25. <keyword>clone</keyword>
  26. <keyword>constructor</keyword>
  27. <keyword>continue</keyword>
  28. <keyword>default</keyword>
  29. <keyword>delegate</keyword>
  30. <keyword>delete</keyword>
  31. <keyword>do</keyword>
  32. <keyword>else</keyword>
  33. <keyword>extends</keyword>
  34. <keyword>for</keyword>
  35. <keyword>foreach</keyword>
  36. <keyword>function</keyword>
  37. <keyword>if</keyword>
  38. <keyword>in</keyword>
  39. <keyword>instanceof</keyword>
  40. <keyword>local</keyword>
  41. <keyword>parent</keyword>
  42. <keyword>resume</keyword>
  43. <keyword>return</keyword>
  44. <keyword>static</keyword>
  45. <keyword>switch</keyword>
  46. <keyword>this</keyword>
  47. <keyword>throw</keyword>
  48. <keyword>try</keyword>
  49. <keyword>typeof</keyword>
  50. <keyword>yield</keyword>
  51. <keyword>while</keyword>
  52. </keyword-list>
  53. <string _name = "Character Constant" style = "String" end-at-line-end = "TRUE">
  54. <start-regex>&apos;</start-regex>
  55. <end-regex>&apos;</end-regex>
  56. </string>
  57. <pattern-item _name = "Decimal" style = "Decimal">
  58. <regex>\b([1-9][0-9]*|0)([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
  59. </pattern-item>
  60. <pattern-item _name = "Floating Point Number" style = "Floating Point">
  61. <regex>\b([0-9]+[Ee][-]?[0-9]+|([0-9]*\.[0-9]+|[0-9]+\.)([Ee][-]?[0-9]+)?)[fFlL]?</regex>
  62. </pattern-item>
  63. <pattern-item _name = "Hex Number" style = "Base-N Integer">
  64. <regex>\b0[xX][0-9a-fA-F]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
  65. </pattern-item>
  66. <keyword-list _name = "Common Macro" style = "Preprocessor" case-sensitive="TRUE">
  67. <keyword>null</keyword>
  68. <keyword>true</keyword>
  69. <keyword>false</keyword>
  70. <keyword>vargc</keyword>
  71. <keyword>vargv</keyword>
  72. </keyword-list>
  73. </language>