Skip to content

Commit

Permalink
Add ZoKrates
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter committed May 6, 2024
1 parent abc8742 commit db1e46e
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 21 deletions.
1 change: 1 addition & 0 deletions LANGUAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,5 +293,6 @@ Xtend (xtend)
YAML (yaml,yml)
Yarn (yarn)
Zig (zig)
ZoKrates (zok)
Zsh (zsh,zshenv,zlogin,zlogout,zprofile,zshrc,.zshenv,.zlogin,.zlogout,.zprofile,.zshrc)
```
38 changes: 19 additions & 19 deletions SCC-OUTPUT-REPORT.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<th>453</th>
<th>7424</th>
<th>1516</th>
<th>399177</th>
<th>399613</th>
<th>3929</th>
</tr><tr>
<td>processor/workers_test.go</td>
Expand Down Expand Up @@ -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/structs_test.go</td>
<td></td>
<td>37</td>
<td>32</td>
<td>8</td>
<td>4</td>
<td>25</td>
<td>6</td>
<td>699</td>
<td>1</td>
<td>23</td>
<td>4</td>
<td>517</td>
<td>19</td>
</tr><tr>
<td>processor/helpers.go</td>
<td></td>
Expand All @@ -280,16 +290,6 @@
<td>2</td>
<td>544</td>
<td>21</td>
</tr><tr>
<td>processor/structs_test.go</td>
<td></td>
<td>32</td>
<td>8</td>
<td>1</td>
<td>23</td>
<td>4</td>
<td>517</td>
<td>19</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>172689</td>
<td>173125</td>
<td>5</td>
</tr></tbody>
<tfoot><tr>
Expand All @@ -329,7 +329,7 @@
<th>453</th>
<th>7424</th>
<th>1516</th>
<th>399177</th>
<th>399613</th>
<th>3929</th>
</tr>
<tr>
Expand Down
16 changes: 16 additions & 0 deletions examples/language/zokrates.zok
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
This is a multi-line comment
written in more than just one line.
*/

def main() -> field {
// an inline comment

u32 mut res = 0;
for u32 i in 0..4 {
for u32 j in i..5 {
res = res + i;
}
}
return res;
}
25 changes: 25 additions & 0 deletions languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -8355,6 +8355,31 @@
}
]
},
"ZoKrates": {
"complexitychecks": [
"for ",
"if ",
"switch ",
"while ",
"else ",
"|| ",
"&& ",
"!= ",
"== "
],
"line_comment": [
"//"
],
"multi_line": [
[
"/*",
"*/"
]
],
"extensions": [
"zok"
]
},
"Ur/Web": {
"complexitychecks": [
"for ",
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 @@ -886,7 +886,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 '
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 '
do
if ./scc "examples/language/" | grep -q "$i "; then
echo -e "${GREEN}PASSED $i Language Check"
Expand Down

0 comments on commit db1e46e

Please sign in to comment.