rouge-lexers-wenyan 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rouge/lexers/wenyan.rb +21 -21
- data/rouge-lexers-wenyan.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 196539d1b98eaa841cebf5631aa335a35836ad68755105432804bfd0a325df21
|
4
|
+
data.tar.gz: e4e56f4677f65b52e836c5147d224fa80f95b016af3f615b589738941cb38570
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 197314b30fcc4e3aa5b2d83758727513cee927c0d48b42be4db9fcf080095ff591b643ee6ae52ad19716e68d0d363d368bcbae72fb076fcae42ad0366d44bd79
|
7
|
+
data.tar.gz: 4b5f99922869b90751800b2adfcc4841044b15795b37d4a205a7a57ee20a98e00a06c4a845e3ce8a2336b16be8d0e894e0843f78d4a3a23e7f5b5ed035941ebf
|
data/lib/rouge/lexers/wenyan.rb
CHANGED
@@ -45,45 +45,45 @@ module Rouge
|
|
45
45
|
state :keywords do # mixin
|
46
46
|
# special handling for some keywords
|
47
47
|
rule %r/([吾今]有)(\s*)(一)(\s*)(術)/ do
|
48
|
-
groups Keyword, Text, Literal::Number, Text,
|
48
|
+
groups Keyword::Declaration, Text, Literal::Number, Text, \
|
49
|
+
Keyword::Type
|
49
50
|
push do
|
50
51
|
mixin :whitespace
|
51
52
|
rule %r/(名之曰)(\s*)(「)(\s*)(#{id_regex})(\s*)(」)/ do
|
52
|
-
groups Keyword, Text, Punctuation, Text,
|
53
|
-
Punctuation
|
53
|
+
groups Keyword::Declaration, Text, Punctuation, Text, \
|
54
|
+
Name::Function, Text, Punctuation
|
54
55
|
end
|
55
56
|
rule %r//, Text, :pop!
|
56
57
|
end
|
57
58
|
end
|
58
59
|
rule %r/(是謂)(\s*)(「)(\s*)(#{id_regex})(\s*)(」)(\s*)(之術也)/ do
|
59
|
-
groups Keyword, Text, Punctuation, Text,
|
60
|
-
Punctuation, Text, Keyword
|
60
|
+
groups Keyword::Declaration, Text, Punctuation, Text, \
|
61
|
+
Name::Function, Text, Punctuation, Text, Keyword::Declaration
|
61
62
|
end
|
62
63
|
rule %r/(施|以施)(\s*)(「)(\s*)(#{id_regex})(\s*)(」)/ do
|
63
|
-
groups
|
64
|
-
Punctuation
|
64
|
+
groups Operator::Word, Text, Punctuation, Text, Name::Function, \
|
65
|
+
Text, Punctuation
|
65
66
|
end
|
66
67
|
mixin :macro_definition
|
67
68
|
rule %r/[注疏批]曰/, Comment, :comment_start
|
68
69
|
|
69
70
|
# other keywords and operators
|
70
|
-
keywords1
|
71
|
-
keywords2
|
72
|
-
keywords3
|
73
|
-
keywords4
|
74
|
-
keywords5
|
75
|
-
declare1
|
76
|
-
declare2
|
77
|
-
declare3
|
78
|
-
declare4
|
79
|
-
declare5
|
80
|
-
types
|
71
|
+
keywords1 = %w[ 若 也 遍 凡 豈 ]
|
72
|
+
keywords2 = %w[ 云云 若非 或若 為是 乃止 乃得 之書 方悟 之義 嗚呼 之禍 ]
|
73
|
+
keywords3 = %w[ 恆為是 是術曰 必先得 乃得矣 吾嘗觀 之禍歟 乃作罷 ]
|
74
|
+
keywords4 = %w[ 若其然者 乃止是遍 乃歸空無 姑妄行此 如事不諧 ]
|
75
|
+
keywords5 = %w[ 若其不然者 不知何禍歟 ]
|
76
|
+
declare1 = %w[ 夫 曰 有 今 噫 ]
|
77
|
+
declare2 = %w[ 吾有 昔之 是矣 今有 物之 是謂 ]
|
78
|
+
declare3 = %w[ 名之曰 之術也 之物也 ]
|
79
|
+
declare4 = %w[ 欲行是術 其物如是 ]
|
80
|
+
declare5 = %w[ 乃行是術曰 今不復存矣 ]
|
81
|
+
types = %w[ 數 言 爻 列 術 物 元 ]
|
81
82
|
operators1 = %w[ 以 於 加 減 乘 除 變 充 銜 之 施 取 ]
|
82
|
-
operators2 = %w[ 書之
|
83
|
+
operators2 = %w[ 書之 等於 大於 小於 之長 中之 以施 ]
|
83
84
|
operators3 = %w[ 不等於 不大於 不小於 之其餘 ]
|
84
85
|
operators4 = %w[ 所餘幾何 中有陽乎 中無陰乎 ]
|
85
|
-
|
86
|
-
# optional in wenyan-lang)
|
86
|
+
|
87
87
|
rule Regexp.new(keywords5.join('|')), Keyword
|
88
88
|
rule Regexp.new(declare5.join('|')), Keyword::Declaration
|
89
89
|
rule Regexp.new(keywords4.join('|')), Keyword
|
data/rouge-lexers-wenyan.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rouge-lexers-wenyan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DGCK81LNN
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rouge
|
@@ -93,7 +93,7 @@ licenses:
|
|
93
93
|
metadata:
|
94
94
|
bug_tracker_uri: https://github.com/DGCK81LNN/rouge-lexers-wenyan/issues
|
95
95
|
source_code_uri: https://github.com/DGCK81LNN/rouge-lexers-wenyan
|
96
|
-
post_install_message:
|
96
|
+
post_install_message:
|
97
97
|
rdoc_options: []
|
98
98
|
require_paths:
|
99
99
|
- lib
|
@@ -108,8 +108,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
|
-
rubygems_version: 3.3.
|
112
|
-
signing_key:
|
111
|
+
rubygems_version: 3.3.26
|
112
|
+
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: Rouge lexer for Wenyan, programming language for the ancient Chinese
|
115
115
|
test_files: []
|