summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Ozdemir <aozdemir@stanford.edu>2024-05-02 09:23:04 -0700
committerGitHub <noreply@github.com>2024-05-02 18:23:04 +0200
commit3ac268d00d2402b63f5e0a74401fa4c8df1eb926 (patch)
tree9d4c3aadb543356ddd0533d14605256f83a560c5
parent1224e98886b9899a41c7f1a11bf6b42d7012585a (diff)
Add the ZoKrates language (#1035)
-rw-r--r--README.md1
-rw-r--r--languages.json6
-rw-r--r--tests/data/zokrates.zok11
3 files changed, 18 insertions, 0 deletions
diff --git a/README.md b/README.md
index f4b97b5..163371e 100644
--- a/README.md
+++ b/README.md
@@ -552,6 +552,7 @@ Xtend
Yaml
ZenCode
Zig
+ZoKrates
Zsh
```
diff --git a/languages.json b/languages.json
index 869b5f9..dd18c7e 100644
--- a/languages.json
+++ b/languages.json
@@ -1744,6 +1744,12 @@
"quotes": [["\\\"", "\\\""]],
"extensions": ["zig"]
},
+ "Zokrates": {
+ "name": "ZoKrates",
+ "line_comment": ["//"],
+ "multi_line_comments": [["/*", "*/"]],
+ "extensions": ["zok"]
+ },
"Zsh": {
"shebangs": ["#!/bin/zsh"],
"line_comment": ["#"],
diff --git a/tests/data/zokrates.zok b/tests/data/zokrates.zok
new file mode 100644
index 0000000..10aa15f
--- /dev/null
+++ b/tests/data/zokrates.zok
@@ -0,0 +1,11 @@
+// 11 lines 3 code 6 comments 2 blanks
+
+/*
+ This is a multi-line comment
+ written in more than just one line.
+*/
+
+def main() -> field {
+ // an inline comment
+ return 42; // on a line.
+}