rouge 3.13.0 → 3.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rouge/demos/nesasm +11 -0
- data/lib/rouge/demos/slice +10 -0
- data/lib/rouge/lexers/d.rb +1 -1
- data/lib/rouge/lexers/dot.rb +2 -2
- data/lib/rouge/lexers/io.rb +2 -2
- data/lib/rouge/lexers/json_doc.rb +4 -3
- data/lib/rouge/lexers/liquid.rb +1 -1
- data/lib/rouge/lexers/m68k.rb +2 -2
- data/lib/rouge/lexers/magik.rb +1 -1
- data/lib/rouge/lexers/nesasm.rb +78 -0
- data/lib/rouge/lexers/nginx.rb +1 -1
- data/lib/rouge/lexers/pony.rb +1 -1
- data/lib/rouge/lexers/protobuf.rb +1 -1
- data/lib/rouge/lexers/scala.rb +3 -3
- data/lib/rouge/lexers/sieve.rb +1 -1
- data/lib/rouge/lexers/slice.rb +32 -0
- data/lib/rouge/lexers/sqf.rb +1 -1
- data/lib/rouge/lexers/toml.rb +16 -1
- data/lib/rouge/lexers/verilog.rb +1 -1
- data/lib/rouge/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d43552856d88e799ffb7f4255d865641bfaafd5dac3945b2646540ff816628c4
|
4
|
+
data.tar.gz: 5768d921766cf2eb677fc63e783b707ee0f52a7320b73f4bbbc333ee14e79f77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdfd25582e56396cb78b370372b4587b243c1608fa7d4ee32a9659f13fc8939bba2305b5add8d83569543766eefed1abbb8ff5f0d76593964db2b3624b1d112b
|
7
|
+
data.tar.gz: 5d2f0526caf091491969d89180fab9a30441ddc5390bbb10c8acb2ea8b9af96b044e91ed32e6db58fa9783a12c530eb3a25d829f031c0ecb7a7e02858592da57
|
@@ -0,0 +1,11 @@
|
|
1
|
+
.bank 0
|
2
|
+
.org $C000
|
3
|
+
Reset:
|
4
|
+
jsr WaitSync ; wait for VSYNC
|
5
|
+
jsr ClearRAM ; clear RAM
|
6
|
+
jsr WaitSync ; wait for VSYNC (and PPU warmup)
|
7
|
+
|
8
|
+
lda #$3f ; $3F -> A register
|
9
|
+
ldy #$00 ; $00 -> Y register
|
10
|
+
sta PPU_ADDR ; write #HIGH byte first
|
11
|
+
sty PPU_ADDR ; $3F00 -> PPU address
|
data/lib/rouge/lexers/d.rb
CHANGED
@@ -48,7 +48,7 @@ module Rouge
|
|
48
48
|
state :root do
|
49
49
|
mixin :whitespace
|
50
50
|
# Comments
|
51
|
-
rule %r(
|
51
|
+
rule %r(//.*), Comment::Single
|
52
52
|
rule %r(/(\\\n)?[*](.|\n)*?[*](\\\n)?/), Comment::Multiline
|
53
53
|
rule %r(/\+), Comment::Multiline, :nested_comment
|
54
54
|
# Keywords
|
data/lib/rouge/lexers/dot.rb
CHANGED
@@ -17,8 +17,8 @@ module Rouge
|
|
17
17
|
|
18
18
|
state :comments_and_whitespace do
|
19
19
|
rule %r/\s+/, Text
|
20
|
-
rule %r(
|
21
|
-
rule %r(
|
20
|
+
rule %r(#.*), Comment::Single
|
21
|
+
rule %r(//.*?$), Comment::Single
|
22
22
|
rule %r(/(\\\n)?[*].*?[*](\\\n)?/)m, Comment::Multiline
|
23
23
|
end
|
24
24
|
|
data/lib/rouge/lexers/io.rb
CHANGED
@@ -27,8 +27,8 @@ module Rouge
|
|
27
27
|
|
28
28
|
state :root do
|
29
29
|
rule %r/\s+/m, Text
|
30
|
-
rule %r(
|
31
|
-
rule %r(
|
30
|
+
rule %r(//.*), Comment::Single
|
31
|
+
rule %r(#.*), Comment::Single
|
32
32
|
rule %r(/(\\\n)?[*].*?[*](\\\n)?/)m, Comment::Multiline
|
33
33
|
rule %r(/[+]), Comment::Multiline, :nested_comment
|
34
34
|
|
@@ -6,16 +6,17 @@ module Rouge
|
|
6
6
|
load_lexer 'json.rb'
|
7
7
|
|
8
8
|
class JSONDOC < JSON
|
9
|
-
desc "JavaScript Object Notation with
|
9
|
+
desc "JavaScript Object Notation with extensions for documentation"
|
10
10
|
tag 'json-doc'
|
11
11
|
|
12
|
-
prepend :
|
12
|
+
prepend :name do
|
13
13
|
rule %r/([$\w]+)(\s*)(:)/ do
|
14
14
|
groups Name::Attribute, Text, Punctuation
|
15
15
|
end
|
16
|
+
end
|
16
17
|
|
18
|
+
prepend :value do
|
17
19
|
rule %r(/[*].*?[*]/), Comment
|
18
|
-
|
19
20
|
rule %r(//.*?$), Comment::Single
|
20
21
|
rule %r/(\.\.\.)/, Comment::Single
|
21
22
|
end
|
data/lib/rouge/lexers/liquid.rb
CHANGED
data/lib/rouge/lexers/m68k.rb
CHANGED
@@ -87,8 +87,8 @@ module Rouge
|
|
87
87
|
|
88
88
|
state :whitespace do
|
89
89
|
rule %r/\n+/m, Text, :expr_bol
|
90
|
-
rule %r(^\*(\\.|.)
|
91
|
-
rule %r(;(\\.|.)
|
90
|
+
rule %r(^\*(\\.|.)*?$), Comment::Single, :expr_bol
|
91
|
+
rule %r(;(\\.|.)*?$), Comment::Single, :expr_bol
|
92
92
|
mixin :inline_whitespace
|
93
93
|
end
|
94
94
|
|
data/lib/rouge/lexers/magik.rb
CHANGED
@@ -22,7 +22,7 @@ module Rouge
|
|
22
22
|
_throw
|
23
23
|
_lock _endlock
|
24
24
|
_if _then _elif _else _endif
|
25
|
-
_for _over _while _loop _endloop _loopbody _continue _leave
|
25
|
+
_for _over _while _loop _finally _endloop _loopbody _continue _leave
|
26
26
|
_return
|
27
27
|
_class
|
28
28
|
_local _constant _recursive _global _dynamic _import
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# -*- coding: utf-8 -*- #
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Rouge
|
5
|
+
module Lexers
|
6
|
+
class NesAsm < RegexLexer
|
7
|
+
title "NesAsm"
|
8
|
+
desc "Nesasm3 assembly (6502 asm)"
|
9
|
+
tag 'nesasm'
|
10
|
+
aliases 'nes'
|
11
|
+
filenames '*.nesasm'
|
12
|
+
|
13
|
+
def self.keywords
|
14
|
+
@keywords ||= %w(
|
15
|
+
ADC AND ASL BIT BRK CMP CPX CPY DEC EOR INC JMP JSR LDA LDX LDY LSR
|
16
|
+
NOP ORA ROL ROR RTI RTS SBC STA STX STY TAX TXA DEX INX TAY TYA DEY
|
17
|
+
INY BPL BMI BVC BVS BCC BCS BNE BEQ CLC SEC CLI SEI CLV CLD SED TXS
|
18
|
+
TSX PHA PLA PHP PLP
|
19
|
+
)
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.keywords_type
|
23
|
+
@keywords_type ||= %w(
|
24
|
+
DB DW BYTE WORD
|
25
|
+
)
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.keywords_reserved
|
29
|
+
@keywords_reserved ||= %w(
|
30
|
+
INCBIN INCLUDE ORG BANK RSSET RS MACRO ENDM DS PROC ENDP PROCGROUP
|
31
|
+
ENDPROCGROUP INCCHR DEFCHR ZP BSS CODE DATA IF IFDEF IFNDEF ELSE
|
32
|
+
ENDIF FAIL INESPRG INESCHR INESMAP INESMIR FUNC
|
33
|
+
)
|
34
|
+
end
|
35
|
+
|
36
|
+
state :root do
|
37
|
+
rule %r/\s+/m, Text
|
38
|
+
rule %r(;.*), Comment::Single
|
39
|
+
|
40
|
+
rule %r/[\(\)\,\.\[\]]/, Punctuation
|
41
|
+
rule %r/\#?\%[0-1]+/, Num::Bin # #%00110011 %00110011
|
42
|
+
rule %r/\#?\$\h+/, Num::Hex # $1f #$1f
|
43
|
+
rule %r/\#?\d+/, Num # 10 #10
|
44
|
+
rule %r([~&*+=\|?:<>/-]), Operator
|
45
|
+
|
46
|
+
rule %r/\#?\w+:?/i do |m|
|
47
|
+
name = m[0].upcase
|
48
|
+
|
49
|
+
if self.class.keywords.include? name
|
50
|
+
token Keyword
|
51
|
+
elsif self.class.keywords_type.include? name
|
52
|
+
token Keyword::Type
|
53
|
+
elsif self.class.keywords_reserved.include? name
|
54
|
+
token Keyword::Reserved
|
55
|
+
else
|
56
|
+
token Name::Function
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
rule %r/\#?(?:LOW|HIGH)\(.*\)/i, Keyword::Reserved # LOW() #HIGH()
|
61
|
+
|
62
|
+
rule %r/\#\(/, Punctuation # #()
|
63
|
+
|
64
|
+
rule %r/"/, Str, :string
|
65
|
+
|
66
|
+
rule %r/'\w'/, Str::Char # 'A' for example
|
67
|
+
|
68
|
+
rule %r/\\\??[\d@#]/, Name::Builtin # builtin parameters for use inside macros and functions: \1-\9 , \?1-\?9 , \# , \@
|
69
|
+
end
|
70
|
+
|
71
|
+
state :string do
|
72
|
+
rule %r/"/, Str, :pop!
|
73
|
+
rule %r/\\"?/, Str::Escape
|
74
|
+
rule %r/[^"\\]+/m, Str
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
data/lib/rouge/lexers/nginx.rb
CHANGED
data/lib/rouge/lexers/pony.rb
CHANGED
@@ -46,7 +46,7 @@ module Rouge
|
|
46
46
|
state :root do
|
47
47
|
mixin :whitespace
|
48
48
|
rule %r/"""/, Str::Doc, :docstring
|
49
|
-
rule %r{
|
49
|
+
rule %r{//.*}, Comment::Single
|
50
50
|
rule %r{/(\\\n)?[*](.|\n)*?[*](\\\n)?/}, Comment::Multiline
|
51
51
|
rule %r/"/, Str, :string
|
52
52
|
rule %r([~!%^&*+=\|?:<>/-]), Operator
|
@@ -17,7 +17,7 @@ module Rouge
|
|
17
17
|
state :root do
|
18
18
|
rule %r/[\s]+/, Text
|
19
19
|
rule %r/[,;{}\[\]()]/, Punctuation
|
20
|
-
rule %r/\/(\\\n)?\/(
|
20
|
+
rule %r/\/(\\\n)?\/($|(.|\n)*?[^\\]$)/, Comment::Single
|
21
21
|
rule %r/\/(\\\n)?\*(.|\n)*?\*(\\\n)?\//, Comment::Multiline
|
22
22
|
rule kw, Keyword
|
23
23
|
rule datatype, Keyword::Type
|
data/lib/rouge/lexers/scala.rb
CHANGED
@@ -43,7 +43,7 @@ module Rouge
|
|
43
43
|
rule %r/'#{idrest}[^']/, Str::Symbol
|
44
44
|
rule %r/[^\S\n]+/, Text
|
45
45
|
|
46
|
-
rule %r(
|
46
|
+
rule %r(//.*), Comment::Single
|
47
47
|
rule %r(/\*), Comment::Multiline, :comment
|
48
48
|
|
49
49
|
rule %r/@#{idrest}/, Name::Decorator
|
@@ -117,7 +117,7 @@ module Rouge
|
|
117
117
|
rule %r/\s+/, Text
|
118
118
|
rule %r/{/, Operator, :pop!
|
119
119
|
rule %r/\(/, Operator, :pop!
|
120
|
-
rule %r(
|
120
|
+
rule %r(//.*), Comment::Single, :pop!
|
121
121
|
rule %r(#{idrest}|#{op}+|`[^`]+`), Name::Class, :pop!
|
122
122
|
end
|
123
123
|
|
@@ -142,7 +142,7 @@ module Rouge
|
|
142
142
|
pop!
|
143
143
|
end
|
144
144
|
|
145
|
-
rule %r(
|
145
|
+
rule %r(//.*), Comment::Single, :pop!
|
146
146
|
rule %r/\.|#{idrest}|#{op}+|`[^`]+`/, Keyword::Type
|
147
147
|
end
|
148
148
|
|
data/lib/rouge/lexers/sieve.rb
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
# -*- coding: utf-8 -*- #
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Rouge
|
5
|
+
module Lexers
|
6
|
+
load_lexer 'c.rb'
|
7
|
+
|
8
|
+
class Slice < C
|
9
|
+
tag 'slice'
|
10
|
+
filenames '*.ice'
|
11
|
+
mimetypes 'text/slice'
|
12
|
+
|
13
|
+
title "Slice"
|
14
|
+
desc "Specification Language for Ice (doc.zeroc.com)"
|
15
|
+
|
16
|
+
def self.keywords
|
17
|
+
@keywords ||= Set.new %w(
|
18
|
+
extends implements enum interface struct class module dictionary
|
19
|
+
const optional out throws exception local idempotent sequence
|
20
|
+
|
21
|
+
Object LocalObject Value
|
22
|
+
)
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.keywords_type
|
26
|
+
@keywords_type ||= Set.new %w(
|
27
|
+
bool string byte long float double int void short
|
28
|
+
)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/rouge/lexers/sqf.rb
CHANGED
@@ -65,7 +65,7 @@ module Rouge
|
|
65
65
|
|
66
66
|
# Preprocessor instructions
|
67
67
|
rule %r"/\*.*?\*/"m, Comment::Multiline
|
68
|
-
rule %r"
|
68
|
+
rule %r"//.*", Comment::Single
|
69
69
|
rule %r"#(define|undef|if(n)?def|else|endif|include)", Comment::Preproc
|
70
70
|
rule %r"\\\r?\n", Comment::Preproc
|
71
71
|
rule %r"__(EVAL|EXEC|LINE__|FILE__)", Name::Builtin
|
data/lib/rouge/lexers/toml.rb
CHANGED
@@ -17,6 +17,12 @@ module Rouge
|
|
17
17
|
rule %r/\s+/, Text
|
18
18
|
rule %r/#.*?$/, Comment
|
19
19
|
rule %r/(true|false)/, Keyword::Constant
|
20
|
+
|
21
|
+
rule %r/(\S+)(\s*)(=)(\s*)(\{)/ do |m|
|
22
|
+
groups Name::Namespace, Text, Operator, Text, Punctuation
|
23
|
+
push :inline
|
24
|
+
end
|
25
|
+
|
20
26
|
rule %r/(?<!=)\s*\[[\S]+\]/, Name::Namespace
|
21
27
|
|
22
28
|
rule %r/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z/, Literal::Date
|
@@ -33,7 +39,6 @@ module Rouge
|
|
33
39
|
groups Name::Property, Text, Punctuation
|
34
40
|
push :value
|
35
41
|
end
|
36
|
-
|
37
42
|
end
|
38
43
|
|
39
44
|
state :value do
|
@@ -63,6 +68,16 @@ module Rouge
|
|
63
68
|
mixin :content
|
64
69
|
rule %r/\]/, Punctuation, :pop!
|
65
70
|
end
|
71
|
+
|
72
|
+
state :inline do
|
73
|
+
mixin :content
|
74
|
+
|
75
|
+
rule %r/(#{identifier})(\s*)(=)/ do
|
76
|
+
groups Name::Property, Text, Punctuation
|
77
|
+
end
|
78
|
+
|
79
|
+
rule %r/\}/, Punctuation, :pop!
|
80
|
+
end
|
66
81
|
end
|
67
82
|
end
|
68
83
|
end
|
data/lib/rouge/lexers/verilog.rb
CHANGED
data/lib/rouge/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rouge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeanine Adkisson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Rouge aims to a be a simple, easy-to-extend drop-in replacement for pygments.
|
14
14
|
email:
|
@@ -130,6 +130,7 @@ files:
|
|
130
130
|
- lib/rouge/demos/msgtrans
|
131
131
|
- lib/rouge/demos/mxml
|
132
132
|
- lib/rouge/demos/nasm
|
133
|
+
- lib/rouge/demos/nesasm
|
133
134
|
- lib/rouge/demos/nginx
|
134
135
|
- lib/rouge/demos/nim
|
135
136
|
- lib/rouge/demos/nix
|
@@ -167,6 +168,7 @@ files:
|
|
167
168
|
- lib/rouge/demos/sed
|
168
169
|
- lib/rouge/demos/shell
|
169
170
|
- lib/rouge/demos/sieve
|
171
|
+
- lib/rouge/demos/slice
|
170
172
|
- lib/rouge/demos/slim
|
171
173
|
- lib/rouge/demos/smalltalk
|
172
174
|
- lib/rouge/demos/smarty
|
@@ -331,6 +333,7 @@ files:
|
|
331
333
|
- lib/rouge/lexers/msgtrans.rb
|
332
334
|
- lib/rouge/lexers/mxml.rb
|
333
335
|
- lib/rouge/lexers/nasm.rb
|
336
|
+
- lib/rouge/lexers/nesasm.rb
|
334
337
|
- lib/rouge/lexers/nginx.rb
|
335
338
|
- lib/rouge/lexers/nim.rb
|
336
339
|
- lib/rouge/lexers/nix.rb
|
@@ -371,6 +374,7 @@ files:
|
|
371
374
|
- lib/rouge/lexers/sed.rb
|
372
375
|
- lib/rouge/lexers/shell.rb
|
373
376
|
- lib/rouge/lexers/sieve.rb
|
377
|
+
- lib/rouge/lexers/slice.rb
|
374
378
|
- lib/rouge/lexers/slim.rb
|
375
379
|
- lib/rouge/lexers/smalltalk.rb
|
376
380
|
- lib/rouge/lexers/smarty.rb
|