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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 94de9e72802c096c9dda17b9807a9d6bb8b6c916e4b80c7ef1cb0a19b7b799ca
4
- data.tar.gz: b60f8c1e89b6d8f90b1a5774d9d0cf540e32ab767d226818bde4a9f5e4e118cd
3
+ metadata.gz: 196539d1b98eaa841cebf5631aa335a35836ad68755105432804bfd0a325df21
4
+ data.tar.gz: e4e56f4677f65b52e836c5147d224fa80f95b016af3f615b589738941cb38570
5
5
  SHA512:
6
- metadata.gz: 0b49612af0f71dc708e5ae4590f58d76188caf3604983f2d729f0d7ab9f0dc05299c55b29e03a2bf494e0ac76200c669221d85d6f5a0439ee072e53c6c65c546
7
- data.tar.gz: cad18f6e9c1af6e11292f06e697c810432a5441d6b1f5c7cb8f39117fa5b67e47f27b2cdfc67ab83fd91af3be5e0680163fd9bb5cad57253ed053cbe217de7ef
6
+ metadata.gz: 197314b30fcc4e3aa5b2d83758727513cee927c0d48b42be4db9fcf080095ff591b643ee6ae52ad19716e68d0d363d368bcbae72fb076fcae42ad0366d44bd79
7
+ data.tar.gz: 4b5f99922869b90751800b2adfcc4841044b15795b37d4a205a7a57ee20a98e00a06c4a845e3ce8a2336b16be8d0e894e0843f78d4a3a23e7f5b5ed035941ebf
@@ -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, Keyword::Type
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, Name::Function, 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, Name::Function, 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 Keyword, Text, Punctuation, Text, Name::Function, Text, \
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 = %w[ 若 也 遍 凡 豈 ]
71
- keywords2 = %w[ 云云 若非 或若 為是 乃止 乃得 之書 方悟 之義 嗚呼 之禍 ]
72
- keywords3 = %w[ 恆為是 是術曰 必先得 乃得矣 吾嘗觀 之禍歟 乃作罷 ]
73
- keywords4 = %w[ 若其然者 乃止是遍 乃歸空無 姑妄行此 如事不諧 ]
74
- keywords5 = %w[ 若其不然者 不知何禍歟 ]
75
- declare1 = %w[ 夫 曰 有 今 噫 ]
76
- declare2 = %w[ 吾有 今有 物之 是謂 ]
77
- declare3 = %w[ 名之曰 之術也 之物也 ]
78
- declare4 = %w[ 欲行是術 其物如是 ]
79
- declare5 = %w[ 乃行是術曰 ]
80
- types = %w[ 數 言 爻 列 術 物 元 ]
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
- # (we have to use these regexps because whitespace is, apparently,
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "rouge-lexers-wenyan"
3
- s.version = "1.4.1"
3
+ s.version = "1.4.2"
4
4
  s.summary =
5
5
  "Rouge lexer for Wenyan, programming language for the ancient Chinese"
6
6
  s.description = <<~END
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.1
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: 2022-12-11 00:00:00.000000000 Z
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.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: []