code_rippa 0.0.7 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile.lock +36 -0
  3. data/LICENSE +2 -2
  4. data/README.md +18 -1
  5. data/bin/code_rippa +15 -16
  6. data/code_rippa.gemspec +12 -10
  7. data/lib/code_rippa.rb +69 -51
  8. data/lib/code_rippa/syntax/actionscript.syntax +52 -52
  9. data/lib/code_rippa/syntax/active4d.syntax +226 -180
  10. data/lib/code_rippa/syntax/active4d_html.syntax +163 -173
  11. data/lib/code_rippa/syntax/active4d_ini.syntax +34 -27
  12. data/lib/code_rippa/syntax/active4d_library.syntax +8 -15
  13. data/lib/code_rippa/syntax/ada.syntax +19 -18
  14. data/lib/code_rippa/syntax/antlr.syntax +85 -85
  15. data/lib/code_rippa/syntax/apache.syntax +103 -109
  16. data/lib/code_rippa/syntax/applescript.syntax +244 -229
  17. data/lib/code_rippa/syntax/asp.syntax +41 -36
  18. data/lib/code_rippa/syntax/asp_vb.net.syntax +77 -72
  19. data/lib/code_rippa/syntax/bibtex.syntax +88 -90
  20. data/lib/code_rippa/syntax/blog_html.syntax +17 -29
  21. data/lib/code_rippa/syntax/blog_markdown.syntax +17 -27
  22. data/lib/code_rippa/syntax/blog_text.syntax +15 -15
  23. data/lib/code_rippa/syntax/blog_textile.syntax +15 -15
  24. data/lib/code_rippa/syntax/build.syntax +27 -27
  25. data/lib/code_rippa/syntax/bulletin_board.syntax +159 -172
  26. data/lib/code_rippa/syntax/c.syntax +31 -34
  27. data/lib/code_rippa/syntax/cake.syntax +27 -27
  28. data/lib/code_rippa/syntax/camlp4.syntax +23 -23
  29. data/lib/code_rippa/syntax/cm.syntax +19 -18
  30. data/lib/code_rippa/syntax/coffeescript.syntax +134 -181
  31. data/lib/code_rippa/syntax/coldfusion.syntax +51 -60
  32. data/lib/code_rippa/syntax/context_free.syntax +106 -106
  33. data/lib/code_rippa/syntax/cs.syntax +31 -34
  34. data/lib/code_rippa/syntax/css.syntax +112 -112
  35. data/lib/code_rippa/syntax/css_experimental.syntax +1006 -1004
  36. data/lib/code_rippa/syntax/csv.syntax +40 -44
  37. data/lib/code_rippa/syntax/d.syntax +80 -84
  38. data/lib/code_rippa/syntax/diff.syntax +46 -45
  39. data/lib/code_rippa/syntax/dokuwiki.syntax +118 -119
  40. data/lib/code_rippa/syntax/dot.syntax +26 -26
  41. data/lib/code_rippa/syntax/doxygen.syntax +26 -26
  42. data/lib/code_rippa/syntax/dylan.syntax +35 -35
  43. data/lib/code_rippa/syntax/eiffel.syntax +39 -42
  44. data/lib/code_rippa/syntax/erlang.syntax +514 -511
  45. data/lib/code_rippa/syntax/f-script.syntax +44 -44
  46. data/lib/code_rippa/syntax/fortran.syntax +80 -76
  47. data/lib/code_rippa/syntax/fxscript.syntax +78 -77
  48. data/lib/code_rippa/syntax/greasemonkey.syntax +20 -20
  49. data/lib/code_rippa/syntax/gri.syntax +47 -47
  50. data/lib/code_rippa/syntax/groovy.syntax +105 -114
  51. data/lib/code_rippa/syntax/gtd.syntax +10 -10
  52. data/lib/code_rippa/syntax/gtdalt.syntax +83 -83
  53. data/lib/code_rippa/syntax/haml.syntax +50 -50
  54. data/lib/code_rippa/syntax/haskell.syntax +47 -47
  55. data/lib/code_rippa/syntax/html-asp.syntax +15 -15
  56. data/lib/code_rippa/syntax/html_django.syntax +15 -14
  57. data/lib/code_rippa/syntax/html_for_asp.net.syntax +232 -245
  58. data/lib/code_rippa/syntax/html_mason.syntax +75 -74
  59. data/lib/code_rippa/syntax/html_rails.syntax +17 -27
  60. data/lib/code_rippa/syntax/html_tcl.syntax +13 -13
  61. data/lib/code_rippa/syntax/icalendar.syntax +15 -15
  62. data/lib/code_rippa/syntax/inform.syntax +26 -26
  63. data/lib/code_rippa/syntax/ini.syntax +30 -30
  64. data/lib/code_rippa/syntax/installer_distribution_script.syntax +49 -49
  65. data/lib/code_rippa/syntax/io.syntax +49 -46
  66. data/lib/code_rippa/syntax/java.syntax +117 -126
  67. data/lib/code_rippa/syntax/javaproperties.syntax +13 -12
  68. data/lib/code_rippa/syntax/javascript.syntax +141 -141
  69. data/lib/code_rippa/syntax/javascript_+_prototype.syntax +42 -41
  70. data/lib/code_rippa/syntax/javascript_+_prototype_bracketed.syntax +92 -91
  71. data/lib/code_rippa/syntax/jquery_javascript.syntax +64 -64
  72. data/lib/code_rippa/syntax/json.syntax +39 -39
  73. data/lib/code_rippa/syntax/languagedefinition.syntax +373 -453
  74. data/lib/code_rippa/syntax/lexflex.syntax +136 -136
  75. data/lib/code_rippa/syntax/lighttpd.syntax +31 -31
  76. data/lib/code_rippa/syntax/lilypond.syntax +246 -337
  77. data/lib/code_rippa/syntax/lisp.syntax +32 -32
  78. data/lib/code_rippa/syntax/literate_haskell.syntax +12 -12
  79. data/lib/code_rippa/syntax/logo.syntax +13 -14
  80. data/lib/code_rippa/syntax/logtalk.syntax +81 -81
  81. data/lib/code_rippa/syntax/lua.syntax +50 -48
  82. data/lib/code_rippa/syntax/m.syntax +78 -78
  83. data/lib/code_rippa/syntax/macports_portfile.syntax +98 -97
  84. data/lib/code_rippa/syntax/makefile.syntax +19 -19
  85. data/lib/code_rippa/syntax/man.syntax +9 -9
  86. data/lib/code_rippa/syntax/mediawiki.syntax +311 -401
  87. data/lib/code_rippa/syntax/mips.syntax +34 -34
  88. data/lib/code_rippa/syntax/mod_perl.syntax +25 -31
  89. data/lib/code_rippa/syntax/modula-3.syntax +24 -24
  90. data/lib/code_rippa/syntax/moinmoin.syntax +102 -102
  91. data/lib/code_rippa/syntax/mootools.syntax +283 -300
  92. data/lib/code_rippa/syntax/movable_type.syntax +91 -90
  93. data/lib/code_rippa/syntax/multimarkdown.syntax +19 -30
  94. data/lib/code_rippa/syntax/objective-c++.syntax +6 -10
  95. data/lib/code_rippa/syntax/objective-c.syntax +134 -138
  96. data/lib/code_rippa/syntax/ocaml.syntax +455 -453
  97. data/lib/code_rippa/syntax/ocamllex.syntax +94 -93
  98. data/lib/code_rippa/syntax/ocamlyacc.syntax +98 -98
  99. data/lib/code_rippa/syntax/opengl.syntax +6 -6
  100. data/lib/code_rippa/syntax/pascal.syntax +43 -42
  101. data/lib/code_rippa/syntax/perl.syntax +612 -615
  102. data/lib/code_rippa/syntax/plain_text.syntax +17 -20
  103. data/lib/code_rippa/syntax/postscript.syntax +71 -69
  104. data/lib/code_rippa/syntax/processing.syntax +60 -60
  105. data/lib/code_rippa/syntax/prolog.syntax +17 -20
  106. data/lib/code_rippa/syntax/property_list.syntax +338 -359
  107. data/lib/code_rippa/syntax/python.syntax +487 -509
  108. data/lib/code_rippa/syntax/python_django.syntax +9 -10
  109. data/lib/code_rippa/syntax/qmake_project.syntax +67 -67
  110. data/lib/code_rippa/syntax/qt_c++.syntax +12 -15
  111. data/lib/code_rippa/syntax/quake3_config.syntax +18 -17
  112. data/lib/code_rippa/syntax/r.syntax +42 -42
  113. data/lib/code_rippa/syntax/r_console.syntax +7 -8
  114. data/lib/code_rippa/syntax/ragel.syntax +109 -115
  115. data/lib/code_rippa/syntax/rd_r_documentation.syntax +53 -53
  116. data/lib/code_rippa/syntax/regexp.syntax +26 -26
  117. data/lib/code_rippa/syntax/release_notes.syntax +46 -26
  118. data/lib/code_rippa/syntax/remind.syntax +146 -146
  119. data/lib/code_rippa/syntax/restructuredtext.syntax +132 -131
  120. data/lib/code_rippa/syntax/rez.syntax +46 -45
  121. data/lib/code_rippa/syntax/ruby.syntax +533 -601
  122. data/lib/code_rippa/syntax/ruby_experimental.syntax +82 -100
  123. data/lib/code_rippa/syntax/ruby_on_rails.syntax +56 -68
  124. data/lib/code_rippa/syntax/s5.syntax +35 -51
  125. data/lib/code_rippa/syntax/scheme.syntax +162 -260
  126. data/lib/code_rippa/syntax/scilab.syntax +18 -18
  127. data/lib/code_rippa/syntax/setext.syntax +82 -82
  128. data/lib/code_rippa/syntax/shell-unix-generic.syntax +227 -226
  129. data/lib/code_rippa/syntax/slate.syntax +91 -91
  130. data/lib/code_rippa/syntax/sql.syntax +137 -139
  131. data/lib/code_rippa/syntax/sql_rails.syntax +8 -8
  132. data/lib/code_rippa/syntax/ssh-config.syntax +17 -17
  133. data/lib/code_rippa/syntax/standard_ml.syntax +67 -69
  134. data/lib/code_rippa/syntax/strings_file.syntax +20 -23
  135. data/lib/code_rippa/syntax/subversion_commit_message.syntax +20 -20
  136. data/lib/code_rippa/syntax/sweave.syntax +45 -45
  137. data/lib/code_rippa/syntax/swig.syntax +34 -33
  138. data/lib/code_rippa/syntax/tcl.syntax +87 -86
  139. data/lib/code_rippa/syntax/template_toolkit.syntax +67 -65
  140. data/lib/code_rippa/syntax/textile.syntax +111 -145
  141. data/lib/code_rippa/syntax/tsv.syntax +31 -33
  142. data/lib/code_rippa/syntax/twiki.syntax +141 -141
  143. data/lib/code_rippa/syntax/txt2tags.syntax +39 -38
  144. data/lib/code_rippa/syntax/vectorscript.syntax +31 -31
  145. data/lib/code_rippa/syntax/xhtml_1.0.syntax +2297 -2296
  146. data/lib/code_rippa/syntax/xml.syntax +95 -95
  147. data/lib/code_rippa/syntax/xml_strict.syntax +49 -50
  148. data/lib/code_rippa/syntax/xsl.syntax +31 -31
  149. data/lib/code_rippa/syntax/yaml.syntax +86 -86
  150. data/lib/code_rippa/syntax/yaml_converter.rb +37 -0
  151. data/lib/code_rippa/syntax/yui_javascript.syntax +88 -88
  152. data/lib/code_rippa/version.rb +2 -2
  153. data/test/fixtures/hello.rb +5 -3
  154. data/test/test_private_methods.rb +40 -40
  155. data/test/test_public_methods.rb +9 -18
  156. metadata +61 -63
@@ -1,294 +1,212 @@
1
- ---
1
+ ---
2
2
  name: Scheme
3
- fileTypes:
3
+ fileTypes:
4
4
  - scm
5
5
  - sch
6
6
  scopeName: source.scheme
7
- repository:
8
- illegal:
7
+ repository:
8
+ illegal:
9
9
  name: invalid.illegal.parenthesis.scheme
10
10
  match: "[()]"
11
- quote-sexp:
12
- begin: (?<=\()\s*(quote)\b\s*
11
+ quote-sexp:
12
+ begin: "(?<=\\()\\s*(quote)\\b\\s*"
13
13
  contentName: string.other.quote.scheme
14
- beginCaptures:
15
- "1":
14
+ beginCaptures:
15
+ '1':
16
16
  name: keyword.control.quote.scheme
17
- end: (?=[\s)])|(?<=\n)
18
- patterns:
17
+ end: "(?=[\\s)])|(?<=\\n)"
18
+ patterns:
19
19
  - include: "#quoted"
20
- comment: "\n\
21
- \t\t\t\tSomething quoted with (quote \xC2\xABthing\xC2\xBB). In this case \xC2\xABthing\xC2\xBB\n\
22
- \t\t\t\twill not be evaluated, so we are considering it a string.\n\
23
- \t\t\t"
24
- quote:
25
- patterns:
20
+ comment: "\n\t\t\t\tSomething quoted with (quote «thing»). In this case «thing»\n\t\t\t\twill
21
+ not be evaluated, so we are considering it a string.\n\t\t\t"
22
+ quote:
23
+ patterns:
26
24
  - name: constant.other.symbol.scheme
27
- captures:
28
- "1":
25
+ captures:
26
+ '1':
29
27
  name: punctuation.section.quoted.symbol.scheme
30
- match: "(?x)\n\
31
- \t\t\t\t\t\t(')\\s*\n\
32
- \t\t\t\t\t\t([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*)\n\
33
- \t\t\t\t\t"
28
+ match: "(?x)\n\t\t\t\t\t\t(')\\s*\n\t\t\t\t\t\t([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*)\n\t\t\t\t\t"
34
29
  - name: constant.other.empty-list.schem
35
- captures:
36
- "1":
30
+ captures:
31
+ '1':
37
32
  name: punctuation.section.quoted.empty-list.scheme
38
- "2":
33
+ '2':
39
34
  name: meta.expression.scheme
40
- "3":
35
+ '3':
41
36
  name: punctuation.section.expression.begin.scheme
42
- "4":
37
+ '4':
43
38
  name: punctuation.section.expression.end.scheme
44
- match: "(?x)\n\
45
- \t\t\t\t\t\t(')\\s*\n\
46
- \t\t\t\t\t\t((\\()\\s*(\\)))\n\
47
- \t\t\t\t\t"
39
+ match: "(?x)\n\t\t\t\t\t\t(')\\s*\n\t\t\t\t\t\t((\\()\\s*(\\)))\n\t\t\t\t\t"
48
40
  - name: string.other.quoted-object.scheme
49
- begin: (')\s*
50
- beginCaptures:
51
- "1":
41
+ begin: "(')\\s*"
42
+ beginCaptures:
43
+ '1':
52
44
  name: punctuation.section.quoted.scheme
53
- end: (?=[\s()])|(?<=\n)
54
- patterns:
45
+ end: "(?=[\\s()])|(?<=\\n)"
46
+ patterns:
55
47
  - include: "#quoted"
56
48
  comment: quoted double-quoted string or s-expression
57
- comment: "\n\
58
- \t\t\t\tWe need to be able to quote any kind of item, which creates\n\
59
- \t\t\t\ta tiny bit of complexity in our grammar. It is hopefully\n\
60
- \t\t\t\tnot overwhelming complexity.\n\
61
- \t\t\t\t\n\
62
- \t\t\t\tNote: the first two matches are special cases. quoted\n\
63
- \t\t\t\tsymbols, and quoted empty lists are considered constant.other\n\
64
- \t\t\t\t\n\
65
- \t\t\t"
66
- language-functions:
67
- patterns:
49
+ comment: "\n\t\t\t\tWe need to be able to quote any kind of item, which creates\n\t\t\t\ta
50
+ tiny bit of complexity in our grammar. It is hopefully\n\t\t\t\tnot overwhelming
51
+ complexity.\n\t\t\t\t\n\t\t\t\tNote: the first two matches are special cases.
52
+ \ quoted\n\t\t\t\tsymbols, and quoted empty lists are considered constant.other\n\t\t\t\t\n\t\t\t"
53
+ language-functions:
54
+ patterns:
68
55
  - name: keyword.control.scheme
69
- match: |-
70
- (?x)
71
- (?<=(\s|\()) # preceded by space or (
72
- ( do|or|and|else|quasiquote|begin|if|case|set!|
73
- cond|let|unquote|define|let\*|unquote-splicing|delay|
74
- letrec)
75
- (?=(\s|\())
56
+ match: "(?x)\n\t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or ( \n\t\t\t\t\t\t(
57
+ do|or|and|else|quasiquote|begin|if|case|set!|\n\t\t\t\t\t\t cond|let|unquote|define|let\\*|unquote-splicing|delay|\n\t\t\t\t\t\t
58
+ \ letrec)\n\t\t\t\t\t\t(?=(\\s|\\())"
76
59
  - name: support.function.boolean-test.scheme
77
- match: "(?x)\n\
78
- \t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\
79
- \t\t\t\t\t\t( char-alphabetic|char-lower-case|char-numeric|\n\
80
- \t\t\t\t\t\t char-ready|char-upper-case|char-whitespace|\n\
81
- \t\t\t\t\t\t (?:char|string)(?:-ci)?(?:=|<=?|>=?)|\n\
82
- \t\t\t\t\t\t atom|boolean|bound-identifier=|char|complex|\n\
83
- \t\t\t\t\t\t identifier|integer|symbol|free-identifier=|inexact|\n\
84
- \t\t\t\t\t\t eof-object|exact|list|(?:input|output)-port|pair|\n\
85
- \t\t\t\t\t\t real|rational|zero|vector|negative|odd|null|string|\n\
86
- \t\t\t\t\t\t eq|equal|eqv|even|number|positive|procedure\n\
87
- \t\t\t\t\t\t)\n\
88
- \t\t\t\t\t\t(\\?)\t\t# name ends with ? sign\n\
89
- \t\t\t\t\t\t(?=(\\s|\\()) # followed by space or (\n\
90
- \t\t\t\t\t"
91
- comment: "\n\
92
- \t\t\t\t\t\tThese functions run a test, and return a boolean\n\
93
- \t\t\t\t\t\tanswer.\n\
94
- \t\t\t\t\t"
60
+ match: "(?x)\n\t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\t\t\t\t\t\t(
61
+ char-alphabetic|char-lower-case|char-numeric|\n\t\t\t\t\t\t char-ready|char-upper-case|char-whitespace|\n\t\t\t\t\t\t
62
+ \ (?:char|string)(?:-ci)?(?:=|<=?|>=?)|\n\t\t\t\t\t\t atom|boolean|bound-identifier=|char|complex|\n\t\t\t\t\t\t
63
+ \ identifier|integer|symbol|free-identifier=|inexact|\n\t\t\t\t\t\t eof-object|exact|list|(?:input|output)-port|pair|\n\t\t\t\t\t\t
64
+ \ real|rational|zero|vector|negative|odd|null|string|\n\t\t\t\t\t\t eq|equal|eqv|even|number|positive|procedure\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(\\?)\t\t#
65
+ name ends with ? sign\n\t\t\t\t\t\t(?=(\\s|\\()) # followed by space or (\n\t\t\t\t\t"
66
+ comment: "\n\t\t\t\t\t\tThese functions run a test, and return a boolean\n\t\t\t\t\t\tanswer.\n\t\t\t\t\t"
95
67
  - name: support.function.convert-type.scheme
96
- match: "(?x)\n\
97
- \t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\
98
- \t\t\t\t\t\t( char->integer|exact->inexact|inexact->exact|\n\
99
- \t\t\t\t\t\t integer->char|symbol->string|list->vector|\n\
100
- \t\t\t\t\t\t list->string|identifier->symbol|vector->list|\n\
101
- \t\t\t\t\t\t string->list|string->number|string->symbol|\n\
102
- \t\t\t\t\t\t number->string\n\
103
- \t\t\t\t\t\t)\n\
104
- \t\t\t\t\t\t(?=(\\s|\\()) # followed by space or (\t\t\t\t\t\n\
105
- \t\t\t\t\t"
106
- comment: "\n\
107
- \t\t\t\t\t\tThese functions change one type into another.\n\
108
- \t\t\t\t\t"
68
+ match: "(?x)\n\t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\t\t\t\t\t\t(
69
+ char->integer|exact->inexact|inexact->exact|\n\t\t\t\t\t\t integer->char|symbol->string|list->vector|\n\t\t\t\t\t\t
70
+ \ list->string|identifier->symbol|vector->list|\n\t\t\t\t\t\t string->list|string->number|string->symbol|\n\t\t\t\t\t\t
71
+ \ number->string\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(?=(\\s|\\()) # followed by space
72
+ or (\t\t\t\t\t\n\t\t\t\t\t"
73
+ comment: "\n\t\t\t\t\t\tThese functions change one type into another.\n\t\t\t\t\t"
109
74
  - name: support.function.with-side-effects.scheme
110
- match: "(?x)\n\
111
- \t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\
112
- \t\t\t\t\t\t( set-(?:car|cdr)|\t\t\t\t # set car/cdr\n\
113
- \t\t\t\t\t\t (?:vector|string)-(?:fill|set) # fill/set string/vector\n\
114
- \t\t\t\t\t\t)\n\
115
- \t\t\t\t\t\t(!)\t\t\t# name ends with ! sign\n\
116
- \t\t\t\t\t\t(?=(\\s|\\()) # followed by space or (\n\
117
- \t\t\t\t\t"
118
- comment: "\n\
119
- \t\t\t\t\t\tThese functions are potentially dangerous because\n\
120
- \t\t\t\t\t\tthey have side-effects which could affect other\n\
121
- \t\t\t\t\t\tparts of the program.\n\
122
- \t\t\t\t\t"
75
+ match: "(?x)\n\t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\t\t\t\t\t\t(
76
+ set-(?:car|cdr)|\t\t\t\t # set car/cdr\n\t\t\t\t\t\t (?:vector|string)-(?:fill|set)
77
+ # fill/set string/vector\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(!)\t\t\t# name ends
78
+ with ! sign\n\t\t\t\t\t\t(?=(\\s|\\()) # followed by space or (\n\t\t\t\t\t"
79
+ comment: "\n\t\t\t\t\t\tThese functions are potentially dangerous because\n\t\t\t\t\t\tthey
80
+ have side-effects which could affect other\n\t\t\t\t\t\tparts of the program.\n\t\t\t\t\t"
123
81
  - name: support.function.arithmetic-operators.scheme
124
- match: "(?x)\n\
125
- \t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\
126
- \t\t\t\t\t\t( >=?|<=?|=|[*/+-])\n\
127
- \t\t\t\t\t\t(?=(\\s|\\()) # followed by space or (\n\
128
- \t\t\t\t\t\t"
129
- comment: "\n\
130
- \t\t\t\t\t\t+, -, *, /, =, >, etc. \n\
131
- \t\t\t\t\t"
82
+ match: "(?x)\n\t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\t\t\t\t\t\t(
83
+ >=?|<=?|=|[*/+-])\n\t\t\t\t\t\t(?=(\\s|\\()) # followed by space or (\n\t\t\t\t\t\t"
84
+ comment: "\n\t\t\t\t\t\t+, -, *, /, =, >, etc. \n\t\t\t\t\t"
132
85
  - name: support.function.general.scheme
133
- match: "(?x)\n\
134
- \t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\
135
- \t\t\t\t\t\t( append|apply|approximate|\n\
136
- \t\t\t\t\t\t call-with-current-continuation|call/cc|catch|\n\
137
- \t\t\t\t\t\t construct-identifier|define-syntax|display|foo|\n\
138
- \t\t\t\t\t\t for-each|force|cd|gen-counter|gen-loser|\n\
139
- \t\t\t\t\t\t generate-identifier|last-pair|length|let-syntax|\n\
140
- \t\t\t\t\t\t letrec-syntax|list|list-ref|list-tail|load|log|\n\
141
- \t\t\t\t\t\t macro|magnitude|map|map-streams|max|member|memq|\n\
142
- \t\t\t\t\t\t memv|min|newline|nil|not|peek-char|rationalize|\n\
143
- \t\t\t\t\t\t read|read-char|return|reverse|sequence|substring|\n\
144
- \t\t\t\t\t\t syntax|syntax-rules|transcript-off|transcript-on|\n\
145
- \t\t\t\t\t\t truncate|unwrap-syntax|values-list|write|write-char|\n\
146
- \t\t\t\t\t\t \n\
147
- \t\t\t\t\t\t # cons, car, cdr, etc\n\
148
- \t\t\t\t\t\t cons|c(a|d){1,4}r| \n \n\
149
- \t\t\t\t\t\t # unary math operators\n\
150
- \t\t\t\t\t\t abs|acos|angle|asin|assoc|assq|assv|atan|ceiling|\n\
151
- \t\t\t\t\t\t cos|floor|round|sin|sqrt|tan|\n\
152
- \t\t\t\t\t\t (?:real|imag)-part|numerator|denominator\n \n\
153
- \t\t\t\t\t\t # other math operators\n\
154
- \t\t\t\t\t\t modulo|exp|expt|remainder|quotient|lcm|\n \n\
155
- \t\t\t\t\t\t # ports / files\n\
156
- \t\t\t\t\t\t call-with-(?:input|output)-file|\n\
157
- \t\t\t\t\t\t (?:close|current)-(?:input|output)-port|\n\
158
- \t\t\t\t\t\t with-(?:input|output)-from-file|\n\
159
- \t\t\t\t\t\t open-(?:input|output)-file|\n\
160
- \t\t\t\t\t\t \n\
161
- \t\t\t\t\t\t # char-\xC2\xABfoo\xC2\xBB\n\
162
- \t\t\t\t\t\t char-(?:downcase|upcase|ready)|\n\
163
- \t\t\t\t\t\t \n\
164
- \t\t\t\t\t\t # make-\xC2\xABfoo\xC2\xBB\n\
165
- \t\t\t\t\t\t make-(?:polar|promise|rectangular|string|vector)\n\
166
- \t\t\t\t\t\t \n\
167
- \t\t\t\t\t\t # string-\xC2\xABfoo\xC2\xBB, vector-\xC2\xABfoo\xC2\xBB\n\
168
- \t\t\t\t\t\t string(?:-(?:append|copy|length|ref))?|\n\
169
- \t\t\t\t\t\t vector(?:-length|-ref)\n\
170
- \t\t\t\t\t\t)\n\
171
- \t\t\t\t\t\t(?=(\\s|\\()) # followed by space or (\n\
172
- \t\t\t\t\t"
173
- quoted:
174
- patterns:
86
+ match: "(?x)\n\t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\t\t\t\t\t\t(
87
+ append|apply|approximate|\n\t\t\t\t\t\t call-with-current-continuation|call/cc|catch|\n\t\t\t\t\t\t
88
+ \ construct-identifier|define-syntax|display|foo|\n\t\t\t\t\t\t for-each|force|cd|gen-counter|gen-loser|\n\t\t\t\t\t\t
89
+ \ generate-identifier|last-pair|length|let-syntax|\n\t\t\t\t\t\t letrec-syntax|list|list-ref|list-tail|load|log|\n\t\t\t\t\t\t
90
+ \ macro|magnitude|map|map-streams|max|member|memq|\n\t\t\t\t\t\t memv|min|newline|nil|not|peek-char|rationalize|\n\t\t\t\t\t\t
91
+ \ read|read-char|return|reverse|sequence|substring|\n\t\t\t\t\t\t syntax|syntax-rules|transcript-off|transcript-on|\n\t\t\t\t\t\t
92
+ \ truncate|unwrap-syntax|values-list|write|write-char|\n\t\t\t\t\t\t \n\t\t\t\t\t\t
93
+ \ # cons, car, cdr, etc\n\t\t\t\t\t\t cons|c(a|d){1,4}r| \n \n\t\t\t\t\t\t
94
+ \ # unary math operators\n\t\t\t\t\t\t abs|acos|angle|asin|assoc|assq|assv|atan|ceiling|\n\t\t\t\t\t\t
95
+ \ cos|floor|round|sin|sqrt|tan|\n\t\t\t\t\t\t (?:real|imag)-part|numerator|denominator\n
96
+ \ \n\t\t\t\t\t\t # other math operators\n\t\t\t\t\t\t
97
+ \ modulo|exp|expt|remainder|quotient|lcm|\n \n\t\t\t\t\t\t
98
+ \ # ports / files\n\t\t\t\t\t\t call-with-(?:input|output)-file|\n\t\t\t\t\t\t
99
+ \ (?:close|current)-(?:input|output)-port|\n\t\t\t\t\t\t with-(?:input|output)-from-file|\n\t\t\t\t\t\t
100
+ \ open-(?:input|output)-file|\n\t\t\t\t\t\t \n\t\t\t\t\t\t # char-«foo»\n\t\t\t\t\t\t
101
+ \ char-(?:downcase|upcase|ready)|\n\t\t\t\t\t\t \n\t\t\t\t\t\t # make-«foo»\n\t\t\t\t\t\t
102
+ \ make-(?:polar|promise|rectangular|string|vector)\n\t\t\t\t\t\t \n\t\t\t\t\t\t
103
+ \ # string-«foo», vector-«foo»\n\t\t\t\t\t\t string(?:-(?:append|copy|length|ref))?|\n\t\t\t\t\t\t
104
+ \ vector(?:-length|-ref)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(?=(\\s|\\()) # followed
105
+ by space or (\n\t\t\t\t\t"
106
+ quoted:
107
+ patterns:
175
108
  - include: "#string"
176
109
  - name: meta.expression.scheme
177
- endCaptures:
178
- "1":
110
+ endCaptures:
111
+ '1':
179
112
  name: punctuation.section.expression.end.scheme
180
- begin: (\()
181
- beginCaptures:
182
- "1":
113
+ begin: "(\\()"
114
+ beginCaptures:
115
+ '1':
183
116
  name: punctuation.section.expression.begin.scheme
184
- end: (\))
185
- patterns:
117
+ end: "(\\))"
118
+ patterns:
186
119
  - include: "#quoted"
187
120
  - include: "#quote"
188
121
  - include: "#illegal"
189
- constants:
190
- patterns:
122
+ constants:
123
+ patterns:
191
124
  - name: constant.language.boolean.scheme
192
125
  match: "#[t|f]"
193
126
  - name: constant.numeric.scheme
194
- match: (?<=[\(\s])(#e|#i)?[0-9][0-9.]*
127
+ match: "(?<=[\\(\\s])(#e|#i)?[0-9][0-9.]*"
195
128
  - name: constant.numeric.scheme
196
- match: (?<=[\(\s])(#x)[0-9a-fA-F]+
129
+ match: "(?<=[\\(\\s])(#x)[0-9a-fA-F]+"
197
130
  - name: constant.numeric.scheme
198
- match: (?<=[\(\s])(#o)[0-7]+
131
+ match: "(?<=[\\(\\s])(#o)[0-7]+"
199
132
  - name: constant.numeric.scheme
200
- match: (?<=[\(\s])(#b)[01]+
201
- comment:
133
+ match: "(?<=[\\(\\s])(#b)[01]+"
134
+ comment:
202
135
  name: comment.line.semicolon.scheme
203
- captures:
204
- "1":
136
+ captures:
137
+ '1':
205
138
  name: punctuation.definition.comment.semicolon.scheme
206
- match: (;).*$\n?
207
- string:
139
+ match: "(;).*$\\n?"
140
+ string:
208
141
  name: string.quoted.double.scheme
209
- endCaptures:
210
- "1":
142
+ endCaptures:
143
+ '1':
211
144
  name: punctuation.definition.string.end.scheme
212
- begin: (")
213
- beginCaptures:
214
- "1":
145
+ begin: "(\")"
146
+ beginCaptures:
147
+ '1':
215
148
  name: punctuation.definition.string.begin.scheme
216
- end: (")
217
- patterns:
149
+ end: "(\")"
150
+ patterns:
218
151
  - name: constant.character.escape.scheme
219
- match: \\.
220
- sexp:
152
+ match: "\\\\."
153
+ sexp:
221
154
  name: meta.expression.scheme
222
- endCaptures:
223
- "1":
155
+ endCaptures:
156
+ '1':
224
157
  name: punctuation.section.expression.end.scheme
225
- "2":
158
+ '2':
226
159
  name: meta.after-expression.scheme
227
- begin: (\()
228
- beginCaptures:
229
- "1":
160
+ begin: "(\\()"
161
+ beginCaptures:
162
+ '1':
230
163
  name: punctuation.section.expression.begin.scheme
231
- end: (\))(\n)?
232
- patterns:
164
+ end: "(\\))(\\n)?"
165
+ patterns:
233
166
  - include: "#comment"
234
167
  - name: meta.declaration.procedure.scheme
235
- captures:
236
- "1":
168
+ captures:
169
+ '1':
237
170
  name: keyword.control.scheme
238
- "2":
171
+ '2':
239
172
  name: entity.name.function.scheme
240
- "3":
173
+ '3':
241
174
  name: variable.parameter.function.scheme
242
- begin: "(?x)\n\
243
- \t\t\t\t\t\t(?<=\\() # preceded by (\n\
244
- \t\t\t\t\t\t(define)\\s+ # define\n\
245
- \t\t\t\t\t\t\\( # list of parameters\n\
246
- \t\t\t\t\t\t ([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*)\n\
247
- \t\t\t\t\t\t ((\\s+\n\
248
- \t\t\t\t\t\t ([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*|[._])\n\
249
- \t\t\t\t\t\t )*\n\
250
- \t\t\t\t\t\t )\\s*\n\
251
- \t\t\t\t\t\t\\)\n\
252
- \t\t\t\t\t"
253
- end: (?=\))
254
- patterns:
175
+ begin: "(?x)\n\t\t\t\t\t\t(?<=\\() # preceded by (\n\t\t\t\t\t\t(define)\\s+
176
+ \ # define\n\t\t\t\t\t\t\\( # list of parameters\n\t\t\t\t\t\t
177
+ \ ([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*)\n\t\t\t\t\t\t ((\\s+\n\t\t\t\t\t\t
178
+ \ ([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*|[._])\n\t\t\t\t\t\t )*\n\t\t\t\t\t\t
179
+ \ )\\s*\n\t\t\t\t\t\t\\)\n\t\t\t\t\t"
180
+ end: "(?=\\))"
181
+ patterns:
255
182
  - include: "#comment"
256
183
  - include: "#sexp"
257
184
  - include: "#illegal"
258
185
  - name: meta.declaration.procedure.scheme
259
- captures:
260
- "1":
186
+ captures:
187
+ '1':
261
188
  name: keyword.control.scheme
262
- "2":
189
+ '2':
263
190
  name: variable.parameter.scheme
264
- begin: "(?x)\n\
265
- \t\t\t\t\t\t(?<=\\() # preceded by (\n\
266
- \t\t\t\t\t\t(lambda)\\s+\n\
267
- \t\t\t\t\t\t(\\() # opening paren\n\
268
- \t\t\t\t\t\t((?:\n\
269
- \t\t\t\t\t\t ([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*|[._])\n\
270
- \t\t\t\t\t\t \\s*\n\
271
- \t\t\t\t\t\t)*)\n\
272
- \t\t\t\t\t\t(\\)) # closing paren\n\
273
- \t\t\t\t\t"
274
- end: (?=\))
275
- patterns:
191
+ begin: "(?x)\n\t\t\t\t\t\t(?<=\\() # preceded by (\n\t\t\t\t\t\t(lambda)\\s+\n\t\t\t\t\t\t(\\()
192
+ # opening paren\n\t\t\t\t\t\t((?:\n\t\t\t\t\t\t ([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*|[._])\n\t\t\t\t\t\t
193
+ \ \\s*\n\t\t\t\t\t\t)*)\n\t\t\t\t\t\t(\\)) # closing paren\n\t\t\t\t\t"
194
+ end: "(?=\\))"
195
+ patterns:
276
196
  - include: "#comment"
277
197
  - include: "#sexp"
278
198
  - include: "#illegal"
279
- comment: "\n\
280
- \t\t\t\t\t\tNot sure this one is quite correct. That \\s* is\n\
281
- \t\t\t\t\t\tparticularly troubling\n\
282
- \t\t\t\t\t"
199
+ comment: "\n\t\t\t\t\t\tNot sure this one is quite correct. That \\s* is\n\t\t\t\t\t\tparticularly
200
+ troubling\n\t\t\t\t\t"
283
201
  - name: meta.declaration.variable.scheme
284
- captures:
285
- "1":
202
+ captures:
203
+ '1':
286
204
  name: keyword.control.scheme
287
- "2":
205
+ '2':
288
206
  name: variable.other.scheme
289
- begin: (?<=\()(define)\s([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*)\s*.*?
290
- end: (?=\))
291
- patterns:
207
+ begin: "(?<=\\()(define)\\s([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*)\\s*.*?"
208
+ end: "(?=\\))"
209
+ patterns:
292
210
  - include: "#comment"
293
211
  - include: "#sexp"
294
212
  - include: "#illegal"
@@ -298,50 +216,34 @@ repository:
298
216
  - include: "#string"
299
217
  - include: "#constants"
300
218
  - name: constant.character.named.scheme
301
- match: (?<=[\(\s])(#\\)(space|newline|tab)(?=[\s\)])
219
+ match: "(?<=[\\(\\s])(#\\\\)(space|newline|tab)(?=[\\s\\)])"
302
220
  - name: constant.character.hex-literal.scheme
303
- match: (?<=[\(\s])(#\\)x[0-9A-F]{2,4}(?=[\s\)])
221
+ match: "(?<=[\\(\\s])(#\\\\)x[0-9A-F]{2,4}(?=[\\s\\)])"
304
222
  - name: constant.character.escape.scheme
305
- match: (?<=[\(\s])(#\\).(?=[\s\)])
223
+ match: "(?<=[\\(\\s])(#\\\\).(?=[\\s\\)])"
306
224
  - name: punctuation.separator.cons.scheme
307
- match: (?<=[ ()])\.(?=[ ()])
308
- comment: "\n\
309
- \t\t\t\t\t\tthe . in (a . b) which conses together two elements\n\
310
- \t\t\t\t\t\ta and b. (a b c) == (a . (b . (c . nil)))\n\
311
- \t\t\t\t\t"
225
+ match: "(?<=[ ()])\\.(?=[ ()])"
226
+ comment: "\n\t\t\t\t\t\tthe . in (a . b) which conses together two elements\n\t\t\t\t\t\ta
227
+ and b. (a b c) == (a . (b . (c . nil)))\n\t\t\t\t\t"
312
228
  - include: "#sexp"
313
229
  - include: "#illegal"
314
230
  uuid: 3EC2CFD0-909C-4692-AC29-1A60ADBC161E
315
- foldingStartMarker: |-
316
- (?x)^ [ \t]* \(
317
- (?<par>
318
- ( [^()\n]++ | \( \g<par> \)? )*+
319
- )
320
- $
321
- patterns:
231
+ foldingStartMarker: "(?x)^ [ \\t]* \\(\n\t (?<par>\n\t ( [^()\\n]++ | \\( \\g<par>
232
+ \\)? )*+\n\t )\n\t$"
233
+ patterns:
322
234
  - include: "#comment"
323
235
  - include: "#sexp"
324
236
  - include: "#string"
325
237
  - include: "#language-functions"
326
238
  - include: "#quote"
327
239
  - include: "#illegal"
328
- foldingStopMarker: |-
329
- (?x)^ [ \t]*
330
- (?<par>
331
- ( [^()\n]++ | \( \g<par> \) )*+
332
- )
333
- ( \) [ \t]*+ ) ++
334
- $
335
- keyEquivalent: ^~S
336
- comment: "\n\
337
- \t\tThe foldings do not currently work the way I want them to. This\n\
338
- \t\tmay be a limitation of the way they are applied rather than the\n\
339
- \t\tregexps in use. Nonetheless, the foldings will end on the last\n\
340
- \t\tidentically indented blank line following an s-expression. Not\n\
341
- \t\tideal perhaps, but it works. Also, the #illegal pattern never\n\
342
- \t\tmatches an unpaired ( as being illegal. Why?! -- Rob Rix\n\
343
- \t\t\n\
344
- \t\tOk, hopefully this grammar works better on quoted stuff now. It\n\
345
- \t\tmay break for fancy macros, but should generally work pretty\n\
346
- \t\tsmoothly. -- Jacob Rus\n\
347
- \t"
240
+ foldingStopMarker: "(?x)^ [ \\t]*\n\t (?<par>\n\t ( [^()\\n]++ | \\( \\g<par>
241
+ \\) )*+\n\t )\n\t ( \\) [ \\t]*+ ) ++\n\t$"
242
+ keyEquivalent: "^~S"
243
+ comment: "\n\t\tThe foldings do not currently work the way I want them to. This\n\t\tmay
244
+ be a limitation of the way they are applied rather than the\n\t\tregexps in use.
245
+ Nonetheless, the foldings will end on the last\n\t\tidentically indented blank line
246
+ following an s-expression. Not\n\t\tideal perhaps, but it works. Also, the #illegal
247
+ pattern never\n\t\tmatches an unpaired ( as being illegal. Why?! -- Rob Rix\n\t\t\n\t\tOk,
248
+ hopefully this grammar works better on quoted stuff now. It\n\t\tmay break for
249
+ fancy macros, but should generally work pretty\n\t\tsmoothly. -- Jacob Rus\n\t"