Skip to content

Commit

Permalink
Add partial support for wenyan (#465)
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter committed May 20, 2024
1 parent 6513eb0 commit eda081d
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 32 deletions.
1 change: 1 addition & 0 deletions LANGUAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ Visual Basic for Applications (cls)
Vue (vue)
Web Services Description Language (wsdl)
WebGPU Shading Language (wgsl)
wenyan (wy)
Windows Resource-Definition Script (rc)
Wolfram (nb,wl)
Wren (wren)
Expand Down
60 changes: 30 additions & 30 deletions SCC-OUTPUT-REPORT.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<th>458</th>
<th>7545</th>
<th>1542</th>
<th>406318</th>
<th>406970</th>
<th>4017</th>
</tr><tr>
<td>processor/formatters.go</td>
Expand Down Expand Up @@ -220,16 +220,6 @@
<td>20</td>
<td>949</td>
<td>31</td>
</tr><tr>
<td>cmd/badges/simplecache_test.go</td>
<td></td>
<td>52</td>
<td>12</td>
<td>0</td>
<td>40</td>
<td>9</td>
<td>1041</td>
<td>30</td>
</tr><tr>
<td>processor/filereader.go</td>
<td></td>
Expand All @@ -240,6 +230,16 @@
<td>6</td>
<td>1329</td>
<td>37</td>
</tr><tr>
<td>cmd/badges/simplecache_test.go</td>
<td></td>
<td>52</td>
<td>12</td>
<td>0</td>
<td>40</td>
<td>9</td>
<td>1041</td>
<td>30</td>
</tr><tr>
<td>processor/cocomo.go</td>
<td></td>
Expand All @@ -250,6 +250,16 @@
<td>0</td>
<td>2222</td>
<td>35</td>
</tr><tr>
<td>processor/cocomo_test.go</td>
<td></td>
<td>37</td>
<td>8</td>
<td>4</td>
<td>25</td>
<td>6</td>
<td>699</td>
<td>23</td>
</tr><tr>
<td>processor/bloom.go</td>
<td></td>
Expand All @@ -261,15 +271,15 @@
<td>1051</td>
<td>29</td>
</tr><tr>
<td>processor/cocomo_test.go</td>
<td>processor/helpers.go</td>
<td></td>
<td>37</td>
<td>8</td>
<td>4</td>
<td>25</td>
<td>32</td>
<td>6</td>
<td>699</td>
<td>23</td>
<td>4</td>
<td>22</td>
<td>2</td>
<td>544</td>
<td>21</td>
</tr><tr>
<td>processor/structs_test.go</td>
<td></td>
Expand All @@ -280,16 +290,6 @@
<td>4</td>
<td>517</td>
<td>19</td>
</tr><tr>
<td>processor/helpers.go</td>
<td></td>
<td>32</td>
<td>6</td>
<td>4</td>
<td>22</td>
<td>2</td>
<td>544</td>
<td>21</td>
</tr><tr>
<td>processor/processor_unix_test.go</td>
<td></td>
Expand Down Expand Up @@ -318,7 +318,7 @@
<td>0</td>
<td>4</td>
<td>0</td>
<td>175829</td>
<td>176481</td>
<td>5</td>
</tr></tbody>
<tfoot><tr>
Expand All @@ -329,7 +329,7 @@
<th>458</th>
<th>7545</th>
<th>1542</th>
<th>406318</th>
<th>406970</th>
<th>4017</th>
</tr>
<tr>
Expand Down
12 changes: 12 additions & 0 deletions examples/language/wenyan.wy
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
批曰。「「文氣淋灕。字句切實」」。
吾有一言。曰「「春日宴。」」。書之。
有數九。名之曰「酒數」。

恆為是。若「酒數」等於零者乃止也。

吾有三言。曰「「與君」」。曰「酒數」。
曰「「杯酒。可以窮歡宴。綠酒一杯歌一遍。」」。書之。

減「酒數」以一。昔之「酒數」者。今其是矣云云。

吾有一言。曰「「綠酒千杯腸已爛。」」。書之。
32 changes: 32 additions & 0 deletions languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -9044,6 +9044,38 @@
]
]
},
"wenyan": {
"complexitychecks": [
"",
"若非",
"等於",
"不等於",
"不大於",
"不小於",
"大於",
"小於",
"",
"為是",
"恆為是",
"中之",
""
],
"extensions": [
"wy"
],
"line_comment": [
"批曰",
"注曰",
"疏曰"
],
"multi_line": [],
"quotes": [
{
"end": "「「",
"start": "」」"
}
]
},
"Windows Resource-Definition Script": {
"extensions": [
"rc"
Expand Down
2 changes: 1 addition & 1 deletion processor/constants.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ else
fi

# Try out specific languages
for i in 'Bosque ' 'Flow9 ' 'Bitbucket Pipeline ' 'Docker ignore ' 'Q# ' 'Futhark ' 'Alloy ' 'Wren ' 'Monkey C ' 'Alchemist ' 'Luna ' 'ignore ' 'XML Schema ' 'Web Services' 'Go ' 'Java ' 'Boo ' 'License ' 'BASH ' 'C Shell ' 'Korn Shell ' 'Makefile ' 'Shell ' 'Zsh ' 'Rakefile ' 'Gemfile ' 'Dockerfile ' 'Yarn ' 'Sieve ' 'F# ' 'Elm ' 'Terraform ' 'Clojure ' 'C# ' 'LLVM IR ' 'HAML ' 'FXML ' 'DM ' 'Nushell ' 'Racket ' 'DOT ' 'YAML ' 'Teal ' 'FSL ' 'INI ' 'Hare ' 'Templ ' 'Cuda ' 'GraphQL ' 'Bicep ' 'Pkl ' 'TypeSpec ' 'LALRPOP ' 'Snakemake ' 'OpenQASM ' 'Typst ' 'ZoKrates ' 'Chapel ' 'Slang ' 'Circom ' 'Proto '
for i in 'Bosque ' 'Flow9 ' 'Bitbucket Pipeline ' 'Docker ignore ' 'Q# ' 'Futhark ' 'Alloy ' 'Wren ' 'Monkey C ' 'Alchemist ' 'Luna ' 'ignore ' 'XML Schema ' 'Web Services' 'Go ' 'Java ' 'Boo ' 'License ' 'BASH ' 'C Shell ' 'Korn Shell ' 'Makefile ' 'Shell ' 'Zsh ' 'Rakefile ' 'Gemfile ' 'Dockerfile ' 'Yarn ' 'Sieve ' 'F# ' 'Elm ' 'Terraform ' 'Clojure ' 'C# ' 'LLVM IR ' 'HAML ' 'FXML ' 'DM ' 'Nushell ' 'Racket ' 'DOT ' 'YAML ' 'Teal ' 'FSL ' 'INI ' 'Hare ' 'Templ ' 'Cuda ' 'GraphQL ' 'Bicep ' 'Pkl ' 'TypeSpec ' 'LALRPOP ' 'Snakemake ' 'OpenQASM ' 'Typst ' 'ZoKrates ' 'Chapel ' 'Slang ' 'Circom ' 'Proto ' 'wenyan '
do
if ./scc "examples/language/" | grep -q "$i "; then
echo -e "${GREEN}PASSED $i Language Check"
Expand Down

0 comments on commit eda081d

Please sign in to comment.