pygments.rb 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/pygments/version.rb +1 -1
- data/vendor/pygments-main/AUTHORS +2 -0
- data/vendor/pygments-main/CHANGES +11 -3
- data/vendor/pygments-main/REVISION +1 -1
- data/vendor/pygments-main/TODO +0 -2
- data/vendor/pygments-main/docs/generate.py +1 -1
- data/vendor/pygments-main/docs/src/tokens.txt +1 -1
- data/vendor/pygments-main/pygments/__init__.py +1 -1
- data/vendor/pygments-main/pygments/formatters/_mapping.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_mapping.py +4 -2
- data/vendor/pygments-main/pygments/lexers/agile.py +15 -15
- data/vendor/pygments-main/pygments/lexers/asm.py +4 -4
- data/vendor/pygments-main/pygments/lexers/compiled.py +9 -9
- data/vendor/pygments-main/pygments/lexers/dotnet.py +5 -5
- data/vendor/pygments-main/pygments/lexers/functional.py +13 -9
- data/vendor/pygments-main/pygments/lexers/hdl.py +21 -22
- data/vendor/pygments-main/pygments/lexers/jvm.py +178 -9
- data/vendor/pygments-main/pygments/lexers/math.py +4 -4
- data/vendor/pygments-main/pygments/lexers/other.py +31 -31
- data/vendor/pygments-main/pygments/lexers/parsers.py +3 -3
- data/vendor/pygments-main/pygments/lexers/shell.py +7 -6
- data/vendor/pygments-main/pygments/lexers/sql.py +4 -4
- data/vendor/pygments-main/pygments/lexers/templates.py +68 -21
- data/vendor/pygments-main/pygments/lexers/text.py +22 -21
- data/vendor/pygments-main/pygments/lexers/web.py +82 -79
- data/vendor/pygments-main/setup.py +1 -1
- data/vendor/pygments-main/tests/examplefiles/antlr_throws +1 -0
- data/vendor/pygments-main/tests/examplefiles/example.kt +47 -0
- data/vendor/pygments-main/tests/examplefiles/example.sh-session +2 -0
- data/vendor/pygments-main/tests/examplefiles/example.tea +34 -0
- data/vendor/pygments-main/tests/examplefiles/function.mu +1 -0
- metadata +14 -10
@@ -0,0 +1 @@
|
|
1
|
+
public f throws a, b, c : x ;
|
@@ -0,0 +1,47 @@
|
|
1
|
+
package addressbook
|
2
|
+
|
3
|
+
class Contact(
|
4
|
+
val name : String,
|
5
|
+
val emails : List<EmailAddress>,
|
6
|
+
val addresses : List<PostalAddress>,
|
7
|
+
val phonenums : List<PhoneNumber>
|
8
|
+
)
|
9
|
+
|
10
|
+
class EmailAddress(
|
11
|
+
val user : String,
|
12
|
+
val host : String
|
13
|
+
)
|
14
|
+
|
15
|
+
class PostalAddress(
|
16
|
+
val streetAddress : String,
|
17
|
+
val city : String,
|
18
|
+
val zip : String,
|
19
|
+
val state : USState?,
|
20
|
+
val country : Country
|
21
|
+
) {
|
22
|
+
assert {(state == null) xor (country == Countries["US"]) }
|
23
|
+
}
|
24
|
+
|
25
|
+
class PhoneNumber(
|
26
|
+
val country : Country,
|
27
|
+
val areaCode : Int,
|
28
|
+
val number : Long
|
29
|
+
)
|
30
|
+
|
31
|
+
object Countries {
|
32
|
+
fun get(id : CountryID) : Country = countryTable[id]
|
33
|
+
|
34
|
+
private var table : Map<String, Country>? = null
|
35
|
+
private val countryTable : Map<String, Country>
|
36
|
+
get() {
|
37
|
+
if (table == null) {
|
38
|
+
table = HashMap()
|
39
|
+
for (line in TextFile("countries.txt").lines(stripWhiteSpace = true)) {
|
40
|
+
table[line] = Country(line)
|
41
|
+
}
|
42
|
+
}
|
43
|
+
return table
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
class Country(val name : String)
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<% template example() {...}
|
2
|
+
a = 123
|
3
|
+
b = "test";
|
4
|
+
c = 4.5
|
5
|
+
d = call other()
|
6
|
+
f = other2()
|
7
|
+
|
8
|
+
define g as String
|
9
|
+
|
10
|
+
h = true
|
11
|
+
i = false
|
12
|
+
j = null
|
13
|
+
%>
|
14
|
+
<html>
|
15
|
+
<head>
|
16
|
+
<title>Example<title>
|
17
|
+
<body>
|
18
|
+
<a href="http://example.com">Test link</a>
|
19
|
+
<% // Second block
|
20
|
+
if(a == 123 and b == "test") {
|
21
|
+
'yes'
|
22
|
+
} else {
|
23
|
+
'no'
|
24
|
+
}
|
25
|
+
|
26
|
+
foreach(i in 1..10) {
|
27
|
+
i & ","
|
28
|
+
}
|
29
|
+
|
30
|
+
foreach(i in #(1,2,3) reverse {
|
31
|
+
i & ";"
|
32
|
+
}
|
33
|
+
|
34
|
+
%>
|
@@ -0,0 +1 @@
|
|
1
|
+
a::b ()
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pygments.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 8
|
10
|
+
version: 0.2.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Aman Gupta
|
@@ -15,12 +15,13 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-03-
|
18
|
+
date: 2012-03-28 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
+
name: rubypython
|
22
23
|
prerelease: false
|
23
|
-
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
25
|
none: false
|
25
26
|
requirements:
|
26
27
|
- - ~>
|
@@ -31,12 +32,12 @@ dependencies:
|
|
31
32
|
- 5
|
32
33
|
- 3
|
33
34
|
version: 0.5.3
|
34
|
-
name: rubypython
|
35
35
|
type: :runtime
|
36
|
-
|
36
|
+
version_requirements: *id001
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
|
+
name: rake-compiler
|
38
39
|
prerelease: false
|
39
|
-
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
40
41
|
none: false
|
41
42
|
requirements:
|
42
43
|
- - "="
|
@@ -47,9 +48,8 @@ dependencies:
|
|
47
48
|
- 7
|
48
49
|
- 6
|
49
50
|
version: 0.7.6
|
50
|
-
name: rake-compiler
|
51
51
|
type: :development
|
52
|
-
|
52
|
+
version_requirements: *id002
|
53
53
|
description: pygments.rb exposes the pygments syntax highlighter via embedded python
|
54
54
|
email:
|
55
55
|
- aman@tmm1.net
|
@@ -214,6 +214,7 @@ files:
|
|
214
214
|
- vendor/pygments-main/tests/examplefiles/Sorting.mod
|
215
215
|
- vendor/pygments-main/tests/examplefiles/Sudoku.lhs
|
216
216
|
- vendor/pygments-main/tests/examplefiles/addressbook.proto
|
217
|
+
- vendor/pygments-main/tests/examplefiles/antlr_throws
|
217
218
|
- vendor/pygments-main/tests/examplefiles/apache2.conf
|
218
219
|
- vendor/pygments-main/tests/examplefiles/as3_test.as
|
219
220
|
- vendor/pygments-main/tests/examplefiles/as3_test2.as
|
@@ -242,6 +243,7 @@ files:
|
|
242
243
|
- vendor/pygments-main/tests/examplefiles/example.cpp
|
243
244
|
- vendor/pygments-main/tests/examplefiles/example.gs
|
244
245
|
- vendor/pygments-main/tests/examplefiles/example.gst
|
246
|
+
- vendor/pygments-main/tests/examplefiles/example.kt
|
245
247
|
- vendor/pygments-main/tests/examplefiles/example.lua
|
246
248
|
- vendor/pygments-main/tests/examplefiles/example.moo
|
247
249
|
- vendor/pygments-main/tests/examplefiles/example.moon
|
@@ -254,6 +256,7 @@ files:
|
|
254
256
|
- vendor/pygments-main/tests/examplefiles/example.sh-session
|
255
257
|
- vendor/pygments-main/tests/examplefiles/example.sml
|
256
258
|
- vendor/pygments-main/tests/examplefiles/example.snobol
|
259
|
+
- vendor/pygments-main/tests/examplefiles/example.tea
|
257
260
|
- vendor/pygments-main/tests/examplefiles/example.u
|
258
261
|
- vendor/pygments-main/tests/examplefiles/example.weechatlog
|
259
262
|
- vendor/pygments-main/tests/examplefiles/example.xhtml
|
@@ -266,6 +269,7 @@ files:
|
|
266
269
|
- vendor/pygments-main/tests/examplefiles/foo.sce
|
267
270
|
- vendor/pygments-main/tests/examplefiles/format.ml
|
268
271
|
- vendor/pygments-main/tests/examplefiles/fucked_up.rb
|
272
|
+
- vendor/pygments-main/tests/examplefiles/function.mu
|
269
273
|
- vendor/pygments-main/tests/examplefiles/functional.rst
|
270
274
|
- vendor/pygments-main/tests/examplefiles/genclass.clj
|
271
275
|
- vendor/pygments-main/tests/examplefiles/genshi_example.xml+genshi
|