| 1 |
{ |
| 2 |
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", |
| 3 |
"scopeName": "source.wenyan", |
| 4 |
"name": "wenyan", |
| 5 |
"patterns": [ |
| 6 |
{ |
| 7 |
"include": "#keywords" |
| 8 |
}, |
| 9 |
{ |
| 10 |
"include": "#constants" |
| 11 |
}, |
| 12 |
{ |
| 13 |
"include": "#operators" |
| 14 |
}, |
| 15 |
{ |
| 16 |
"include": "#symbols" |
| 17 |
}, |
| 18 |
{ |
| 19 |
"include": "#expression" |
| 20 |
}, |
| 21 |
{ |
| 22 |
"include": "#comment-blocks" |
| 23 |
}, |
| 24 |
{ |
| 25 |
"include": "#comment-lines" |
| 26 |
} |
| 27 |
], |
| 28 |
"repository": { |
| 29 |
"expression": { |
| 30 |
"patterns": [ |
| 31 |
{ |
| 32 |
"include": "#variables" |
| 33 |
} |
| 34 |
] |
| 35 |
}, |
| 36 |
"keywords": { |
| 37 |
"patterns": [ |
| 38 |
{ |
| 39 |
"name": "storage.type", |
| 40 |
"match": "數|列|言|術|爻|物|� |
| 41 |
�" |
| 42 |
}, |
| 43 |
{ |
| 44 |
"name": "keyword.control", |
| 45 |
"match": "乃行是術曰|若� |
| 46 |
�不然� |
| 47 |
|乃歸空無|欲行是術|乃止是遍|若� |
| 48 |
�然� |
| 49 |
|� |
| 50 |
�物如是|乃得矣|之術也|� |
| 51 |
� |
| 52 |
�得|是術曰|恆為是|之物也|乃得|是謂|云云|中之|為是|乃止|若非|或若|之長|� |
| 53 |
�餘" |
| 54 |
}, |
| 55 |
{ |
| 56 |
"name": "keyword.control", |
| 57 |
"match": "或云|蓋謂" |
| 58 |
}, |
| 59 |
{ |
| 60 |
"name": "keyword.operator", |
| 61 |
"match": "中有陽乎|中無陰乎|所餘幾何|不等於|不大於|不小於|等於|大於|小於|加|減|乘|除|變|以|於" |
| 62 |
}, |
| 63 |
{ |
| 64 |
"name": "keyword.other", |
| 65 |
"match": "不知何禍歟|不復存矣|姑妄行此|如事不諧|名之曰|吾嘗觀|之禍歟|乃作罷|吾有|今有|物之|書之|以施|昔之|是矣|之書|方悟|之義|嗚呼|之禍|有|施|曰|噫|取|今|夫|中|豈" |
| 66 |
}, |
| 67 |
{ |
| 68 |
"name": "keyword.control", |
| 69 |
"match": "也|凡|遍|若|� |
| 70 |
|之|� |
| 71 |
|
| 72 |
|銜" |
| 73 |
} |
| 74 |
] |
| 75 |
}, |
| 76 |
"comment-lines": { |
| 77 |
"name": "comment.line", |
| 78 |
"begin": "注曰|疏曰|批曰", |
| 79 |
"end": "$", |
| 80 |
"patterns": [ |
| 81 |
{ |
| 82 |
"name": "constant.character", |
| 83 |
"match": "\\\\." |
| 84 |
} |
| 85 |
] |
| 86 |
}, |
| 87 |
"comment-blocks": { |
| 88 |
"name": "comment.block", |
| 89 |
"begin": "(注曰|疏曰|批曰)。?(「「|『)", |
| 90 |
"end": "(」」|』)", |
| 91 |
"patterns": [ |
| 92 |
{ |
| 93 |
"name": "constant.character", |
| 94 |
"match": "\\\\." |
| 95 |
} |
| 96 |
] |
| 97 |
}, |
| 98 |
"constants": { |
| 99 |
"patterns": [ |
| 100 |
{ |
| 101 |
"name": "constant.numeric", |
| 102 |
"match": "負|·|又|零|〇|一|二|三|四|五|� |
| 103 |
�|七|� |
| 104 |
�|九|十|百|千|萬|億|� |
| 105 |
�|京|垓|秭|穰|溝|澗|正|載|極|分|釐|毫|絲|忽|微|纖|沙|塵|埃|渺|漠" |
| 106 |
}, |
| 107 |
{ |
| 108 |
"name": "constant.language", |
| 109 |
"match": "� |
| 110 |
�|陰|陽" |
| 111 |
}, |
| 112 |
{ |
| 113 |
"name": "string.quoted", |
| 114 |
"begin": "「「|『", |
| 115 |
"end": "」」|』", |
| 116 |
"patterns": [ |
| 117 |
{ |
| 118 |
"name": "constant.character", |
| 119 |
"match": "\\\\." |
| 120 |
} |
| 121 |
] |
| 122 |
} |
| 123 |
] |
| 124 |
}, |
| 125 |
"symbols": { |
| 126 |
"patterns": [ |
| 127 |
{ |
| 128 |
"name": "punctuation.separator", |
| 129 |
"match": "。|、" |
| 130 |
} |
| 131 |
] |
| 132 |
}, |
| 133 |
"variables": { |
| 134 |
"name": "variable.other", |
| 135 |
"begin": "「", |
| 136 |
"end": "」", |
| 137 |
"patterns": [ |
| 138 |
{ |
| 139 |
"name": "constant.character", |
| 140 |
"match": "\\\\." |
| 141 |
} |
| 142 |
] |
| 143 |
} |
| 144 |
} |
| 145 |
} |
| 146 |
|