code_rippa 0.0.7 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile.lock +36 -0
- data/LICENSE +2 -2
- data/README.md +18 -1
- data/bin/code_rippa +15 -16
- data/code_rippa.gemspec +12 -10
- data/lib/code_rippa.rb +69 -51
- data/lib/code_rippa/syntax/actionscript.syntax +52 -52
- data/lib/code_rippa/syntax/active4d.syntax +226 -180
- data/lib/code_rippa/syntax/active4d_html.syntax +163 -173
- data/lib/code_rippa/syntax/active4d_ini.syntax +34 -27
- data/lib/code_rippa/syntax/active4d_library.syntax +8 -15
- data/lib/code_rippa/syntax/ada.syntax +19 -18
- data/lib/code_rippa/syntax/antlr.syntax +85 -85
- data/lib/code_rippa/syntax/apache.syntax +103 -109
- data/lib/code_rippa/syntax/applescript.syntax +244 -229
- data/lib/code_rippa/syntax/asp.syntax +41 -36
- data/lib/code_rippa/syntax/asp_vb.net.syntax +77 -72
- data/lib/code_rippa/syntax/bibtex.syntax +88 -90
- data/lib/code_rippa/syntax/blog_html.syntax +17 -29
- data/lib/code_rippa/syntax/blog_markdown.syntax +17 -27
- data/lib/code_rippa/syntax/blog_text.syntax +15 -15
- data/lib/code_rippa/syntax/blog_textile.syntax +15 -15
- data/lib/code_rippa/syntax/build.syntax +27 -27
- data/lib/code_rippa/syntax/bulletin_board.syntax +159 -172
- data/lib/code_rippa/syntax/c.syntax +31 -34
- data/lib/code_rippa/syntax/cake.syntax +27 -27
- data/lib/code_rippa/syntax/camlp4.syntax +23 -23
- data/lib/code_rippa/syntax/cm.syntax +19 -18
- data/lib/code_rippa/syntax/coffeescript.syntax +134 -181
- data/lib/code_rippa/syntax/coldfusion.syntax +51 -60
- data/lib/code_rippa/syntax/context_free.syntax +106 -106
- data/lib/code_rippa/syntax/cs.syntax +31 -34
- data/lib/code_rippa/syntax/css.syntax +112 -112
- data/lib/code_rippa/syntax/css_experimental.syntax +1006 -1004
- data/lib/code_rippa/syntax/csv.syntax +40 -44
- data/lib/code_rippa/syntax/d.syntax +80 -84
- data/lib/code_rippa/syntax/diff.syntax +46 -45
- data/lib/code_rippa/syntax/dokuwiki.syntax +118 -119
- data/lib/code_rippa/syntax/dot.syntax +26 -26
- data/lib/code_rippa/syntax/doxygen.syntax +26 -26
- data/lib/code_rippa/syntax/dylan.syntax +35 -35
- data/lib/code_rippa/syntax/eiffel.syntax +39 -42
- data/lib/code_rippa/syntax/erlang.syntax +514 -511
- data/lib/code_rippa/syntax/f-script.syntax +44 -44
- data/lib/code_rippa/syntax/fortran.syntax +80 -76
- data/lib/code_rippa/syntax/fxscript.syntax +78 -77
- data/lib/code_rippa/syntax/greasemonkey.syntax +20 -20
- data/lib/code_rippa/syntax/gri.syntax +47 -47
- data/lib/code_rippa/syntax/groovy.syntax +105 -114
- data/lib/code_rippa/syntax/gtd.syntax +10 -10
- data/lib/code_rippa/syntax/gtdalt.syntax +83 -83
- data/lib/code_rippa/syntax/haml.syntax +50 -50
- data/lib/code_rippa/syntax/haskell.syntax +47 -47
- data/lib/code_rippa/syntax/html-asp.syntax +15 -15
- data/lib/code_rippa/syntax/html_django.syntax +15 -14
- data/lib/code_rippa/syntax/html_for_asp.net.syntax +232 -245
- data/lib/code_rippa/syntax/html_mason.syntax +75 -74
- data/lib/code_rippa/syntax/html_rails.syntax +17 -27
- data/lib/code_rippa/syntax/html_tcl.syntax +13 -13
- data/lib/code_rippa/syntax/icalendar.syntax +15 -15
- data/lib/code_rippa/syntax/inform.syntax +26 -26
- data/lib/code_rippa/syntax/ini.syntax +30 -30
- data/lib/code_rippa/syntax/installer_distribution_script.syntax +49 -49
- data/lib/code_rippa/syntax/io.syntax +49 -46
- data/lib/code_rippa/syntax/java.syntax +117 -126
- data/lib/code_rippa/syntax/javaproperties.syntax +13 -12
- data/lib/code_rippa/syntax/javascript.syntax +141 -141
- data/lib/code_rippa/syntax/javascript_+_prototype.syntax +42 -41
- data/lib/code_rippa/syntax/javascript_+_prototype_bracketed.syntax +92 -91
- data/lib/code_rippa/syntax/jquery_javascript.syntax +64 -64
- data/lib/code_rippa/syntax/json.syntax +39 -39
- data/lib/code_rippa/syntax/languagedefinition.syntax +373 -453
- data/lib/code_rippa/syntax/lexflex.syntax +136 -136
- data/lib/code_rippa/syntax/lighttpd.syntax +31 -31
- data/lib/code_rippa/syntax/lilypond.syntax +246 -337
- data/lib/code_rippa/syntax/lisp.syntax +32 -32
- data/lib/code_rippa/syntax/literate_haskell.syntax +12 -12
- data/lib/code_rippa/syntax/logo.syntax +13 -14
- data/lib/code_rippa/syntax/logtalk.syntax +81 -81
- data/lib/code_rippa/syntax/lua.syntax +50 -48
- data/lib/code_rippa/syntax/m.syntax +78 -78
- data/lib/code_rippa/syntax/macports_portfile.syntax +98 -97
- data/lib/code_rippa/syntax/makefile.syntax +19 -19
- data/lib/code_rippa/syntax/man.syntax +9 -9
- data/lib/code_rippa/syntax/mediawiki.syntax +311 -401
- data/lib/code_rippa/syntax/mips.syntax +34 -34
- data/lib/code_rippa/syntax/mod_perl.syntax +25 -31
- data/lib/code_rippa/syntax/modula-3.syntax +24 -24
- data/lib/code_rippa/syntax/moinmoin.syntax +102 -102
- data/lib/code_rippa/syntax/mootools.syntax +283 -300
- data/lib/code_rippa/syntax/movable_type.syntax +91 -90
- data/lib/code_rippa/syntax/multimarkdown.syntax +19 -30
- data/lib/code_rippa/syntax/objective-c++.syntax +6 -10
- data/lib/code_rippa/syntax/objective-c.syntax +134 -138
- data/lib/code_rippa/syntax/ocaml.syntax +455 -453
- data/lib/code_rippa/syntax/ocamllex.syntax +94 -93
- data/lib/code_rippa/syntax/ocamlyacc.syntax +98 -98
- data/lib/code_rippa/syntax/opengl.syntax +6 -6
- data/lib/code_rippa/syntax/pascal.syntax +43 -42
- data/lib/code_rippa/syntax/perl.syntax +612 -615
- data/lib/code_rippa/syntax/plain_text.syntax +17 -20
- data/lib/code_rippa/syntax/postscript.syntax +71 -69
- data/lib/code_rippa/syntax/processing.syntax +60 -60
- data/lib/code_rippa/syntax/prolog.syntax +17 -20
- data/lib/code_rippa/syntax/property_list.syntax +338 -359
- data/lib/code_rippa/syntax/python.syntax +487 -509
- data/lib/code_rippa/syntax/python_django.syntax +9 -10
- data/lib/code_rippa/syntax/qmake_project.syntax +67 -67
- data/lib/code_rippa/syntax/qt_c++.syntax +12 -15
- data/lib/code_rippa/syntax/quake3_config.syntax +18 -17
- data/lib/code_rippa/syntax/r.syntax +42 -42
- data/lib/code_rippa/syntax/r_console.syntax +7 -8
- data/lib/code_rippa/syntax/ragel.syntax +109 -115
- data/lib/code_rippa/syntax/rd_r_documentation.syntax +53 -53
- data/lib/code_rippa/syntax/regexp.syntax +26 -26
- data/lib/code_rippa/syntax/release_notes.syntax +46 -26
- data/lib/code_rippa/syntax/remind.syntax +146 -146
- data/lib/code_rippa/syntax/restructuredtext.syntax +132 -131
- data/lib/code_rippa/syntax/rez.syntax +46 -45
- data/lib/code_rippa/syntax/ruby.syntax +533 -601
- data/lib/code_rippa/syntax/ruby_experimental.syntax +82 -100
- data/lib/code_rippa/syntax/ruby_on_rails.syntax +56 -68
- data/lib/code_rippa/syntax/s5.syntax +35 -51
- data/lib/code_rippa/syntax/scheme.syntax +162 -260
- data/lib/code_rippa/syntax/scilab.syntax +18 -18
- data/lib/code_rippa/syntax/setext.syntax +82 -82
- data/lib/code_rippa/syntax/shell-unix-generic.syntax +227 -226
- data/lib/code_rippa/syntax/slate.syntax +91 -91
- data/lib/code_rippa/syntax/sql.syntax +137 -139
- data/lib/code_rippa/syntax/sql_rails.syntax +8 -8
- data/lib/code_rippa/syntax/ssh-config.syntax +17 -17
- data/lib/code_rippa/syntax/standard_ml.syntax +67 -69
- data/lib/code_rippa/syntax/strings_file.syntax +20 -23
- data/lib/code_rippa/syntax/subversion_commit_message.syntax +20 -20
- data/lib/code_rippa/syntax/sweave.syntax +45 -45
- data/lib/code_rippa/syntax/swig.syntax +34 -33
- data/lib/code_rippa/syntax/tcl.syntax +87 -86
- data/lib/code_rippa/syntax/template_toolkit.syntax +67 -65
- data/lib/code_rippa/syntax/textile.syntax +111 -145
- data/lib/code_rippa/syntax/tsv.syntax +31 -33
- data/lib/code_rippa/syntax/twiki.syntax +141 -141
- data/lib/code_rippa/syntax/txt2tags.syntax +39 -38
- data/lib/code_rippa/syntax/vectorscript.syntax +31 -31
- data/lib/code_rippa/syntax/xhtml_1.0.syntax +2297 -2296
- data/lib/code_rippa/syntax/xml.syntax +95 -95
- data/lib/code_rippa/syntax/xml_strict.syntax +49 -50
- data/lib/code_rippa/syntax/xsl.syntax +31 -31
- data/lib/code_rippa/syntax/yaml.syntax +86 -86
- data/lib/code_rippa/syntax/yaml_converter.rb +37 -0
- data/lib/code_rippa/syntax/yui_javascript.syntax +88 -88
- data/lib/code_rippa/version.rb +2 -2
- data/test/fixtures/hello.rb +5 -3
- data/test/test_private_methods.rb +40 -40
- data/test/test_public_methods.rb +9 -18
- 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: (
|
11
|
+
quote-sexp:
|
12
|
+
begin: "(?<=\\()\\s*(quote)\\b\\s*"
|
13
13
|
contentName: string.other.quote.scheme
|
14
|
-
beginCaptures:
|
15
|
-
|
14
|
+
beginCaptures:
|
15
|
+
'1':
|
16
16
|
name: keyword.control.quote.scheme
|
17
|
-
end: (?=[
|
18
|
-
patterns:
|
17
|
+
end: "(?=[\\s)])|(?<=\\n)"
|
18
|
+
patterns:
|
19
19
|
- include: "#quoted"
|
20
|
-
comment: "\n\
|
21
|
-
|
22
|
-
|
23
|
-
|
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
|
-
|
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
|
-
|
30
|
+
captures:
|
31
|
+
'1':
|
37
32
|
name: punctuation.section.quoted.empty-list.scheme
|
38
|
-
|
33
|
+
'2':
|
39
34
|
name: meta.expression.scheme
|
40
|
-
|
35
|
+
'3':
|
41
36
|
name: punctuation.section.expression.begin.scheme
|
42
|
-
|
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: (')
|
50
|
-
beginCaptures:
|
51
|
-
|
41
|
+
begin: "(')\\s*"
|
42
|
+
beginCaptures:
|
43
|
+
'1':
|
52
44
|
name: punctuation.section.quoted.scheme
|
53
|
-
end: (?=[
|
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
|
-
|
59
|
-
\t\t\t\
|
60
|
-
\t\t\t\
|
61
|
-
|
62
|
-
|
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
|
-
|
71
|
-
|
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
|
79
|
-
\t\t\t\t\t\t
|
80
|
-
\t\t\t\t\t\t
|
81
|
-
\t\t\t\t\t\t
|
82
|
-
\t\t\t\t\t\t
|
83
|
-
|
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
|
98
|
-
\t\t\t\t\t\t
|
99
|
-
\t\t\t\t\t\t
|
100
|
-
\t\t\t\t\t\
|
101
|
-
|
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(
|
112
|
-
\t\t\t\t\t\t
|
113
|
-
\t\t\t\t\t\t
|
114
|
-
|
115
|
-
\t\t\t\t\t\t
|
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(
|
126
|
-
|
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
|
135
|
-
\t\t\t\t\t\t
|
136
|
-
\t\t\t\t\t\t
|
137
|
-
\t\t\t\t\t\t
|
138
|
-
\t\t\t\t\t\t
|
139
|
-
\t\t\t\t\t\t
|
140
|
-
\t\t\t\t\t\t
|
141
|
-
\t\t\t\t\t\t
|
142
|
-
\t\t\t\t\t\t
|
143
|
-
\t\t\t\t\t\t
|
144
|
-
\t\t\t\t\t\t
|
145
|
-
\t\t\t\t\t\t
|
146
|
-
\t\t\t\t\t\t
|
147
|
-
\t\t\t\t\t\t #
|
148
|
-
\t\t\t\t\t\t
|
149
|
-
\t\t\t\t\t\t
|
150
|
-
\t\t\t\t\t\t
|
151
|
-
\t\t\t\t\t\t
|
152
|
-
\
|
153
|
-
|
154
|
-
|
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
|
-
|
110
|
+
endCaptures:
|
111
|
+
'1':
|
179
112
|
name: punctuation.section.expression.end.scheme
|
180
|
-
begin: (
|
181
|
-
beginCaptures:
|
182
|
-
|
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: (?<=[
|
127
|
+
match: "(?<=[\\(\\s])(#e|#i)?[0-9][0-9.]*"
|
195
128
|
- name: constant.numeric.scheme
|
196
|
-
match: (?<=[
|
129
|
+
match: "(?<=[\\(\\s])(#x)[0-9a-fA-F]+"
|
197
130
|
- name: constant.numeric.scheme
|
198
|
-
match: (?<=[
|
131
|
+
match: "(?<=[\\(\\s])(#o)[0-7]+"
|
199
132
|
- name: constant.numeric.scheme
|
200
|
-
match: (?<=[
|
201
|
-
comment:
|
133
|
+
match: "(?<=[\\(\\s])(#b)[01]+"
|
134
|
+
comment:
|
202
135
|
name: comment.line.semicolon.scheme
|
203
|
-
captures:
|
204
|
-
|
136
|
+
captures:
|
137
|
+
'1':
|
205
138
|
name: punctuation.definition.comment.semicolon.scheme
|
206
|
-
match: (;)
|
207
|
-
string:
|
139
|
+
match: "(;).*$\\n?"
|
140
|
+
string:
|
208
141
|
name: string.quoted.double.scheme
|
209
|
-
endCaptures:
|
210
|
-
|
142
|
+
endCaptures:
|
143
|
+
'1':
|
211
144
|
name: punctuation.definition.string.end.scheme
|
212
|
-
begin: (")
|
213
|
-
beginCaptures:
|
214
|
-
|
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
|
-
|
155
|
+
endCaptures:
|
156
|
+
'1':
|
224
157
|
name: punctuation.section.expression.end.scheme
|
225
|
-
|
158
|
+
'2':
|
226
159
|
name: meta.after-expression.scheme
|
227
|
-
begin: (
|
228
|
-
beginCaptures:
|
229
|
-
|
160
|
+
begin: "(\\()"
|
161
|
+
beginCaptures:
|
162
|
+
'1':
|
230
163
|
name: punctuation.section.expression.begin.scheme
|
231
|
-
end: (
|
232
|
-
patterns:
|
164
|
+
end: "(\\))(\\n)?"
|
165
|
+
patterns:
|
233
166
|
- include: "#comment"
|
234
167
|
- name: meta.declaration.procedure.scheme
|
235
|
-
captures:
|
236
|
-
|
168
|
+
captures:
|
169
|
+
'1':
|
237
170
|
name: keyword.control.scheme
|
238
|
-
|
171
|
+
'2':
|
239
172
|
name: entity.name.function.scheme
|
240
|
-
|
173
|
+
'3':
|
241
174
|
name: variable.parameter.function.scheme
|
242
|
-
begin: "(?x)\n\
|
243
|
-
\t\t\t\t\t\t(
|
244
|
-
\t\t\t\t\t\t(
|
245
|
-
\t\t\t\t\t\t
|
246
|
-
\t\t\t\t\t\t
|
247
|
-
|
248
|
-
|
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
|
-
|
186
|
+
captures:
|
187
|
+
'1':
|
261
188
|
name: keyword.control.scheme
|
262
|
-
|
189
|
+
'2':
|
263
190
|
name: variable.parameter.scheme
|
264
|
-
begin: "(?x)\n\
|
265
|
-
\t\t\t\t\t\t(
|
266
|
-
\t\t\t\t\t\t(
|
267
|
-
|
268
|
-
|
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
|
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
|
-
|
202
|
+
captures:
|
203
|
+
'1':
|
286
204
|
name: keyword.control.scheme
|
287
|
-
|
205
|
+
'2':
|
288
206
|
name: variable.other.scheme
|
289
|
-
begin: (
|
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: (?<=[
|
219
|
+
match: "(?<=[\\(\\s])(#\\\\)(space|newline|tab)(?=[\\s\\)])"
|
302
220
|
- name: constant.character.hex-literal.scheme
|
303
|
-
match: (?<=[
|
221
|
+
match: "(?<=[\\(\\s])(#\\\\)x[0-9A-F]{2,4}(?=[\\s\\)])"
|
304
222
|
- name: constant.character.escape.scheme
|
305
|
-
match: (?<=[
|
223
|
+
match: "(?<=[\\(\\s])(#\\\\).(?=[\\s\\)])"
|
306
224
|
- name: punctuation.separator.cons.scheme
|
307
|
-
match: (?<=[ ()])
|
308
|
-
comment: "\n\
|
309
|
-
|
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
|
-
|
317
|
-
|
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
|
-
(
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
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"
|