Skip to content

Commit

Permalink
DAML Language (#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter authored Oct 1, 2024
1 parent 4089f8a commit f5dd53f
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 4 deletions.
1 change: 1 addition & 0 deletions LANGUAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ CSV (csv)
Cuda (cu)
Cython (pyx,pxi,pxd)
D (d)
DAML (daml)
Dart (dart)
Device Tree (dts,dtsi)
Dhall (dhall)
Expand Down
6 changes: 3 additions & 3 deletions SCC-OUTPUT-REPORT.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<th>447</th>
<th>7659</th>
<th>1529</th>
<th>254192</th>
<th>254284</th>
<th>4067</th>
</tr><tr>
<td>processor/formatters.go</td>
Expand Down Expand Up @@ -288,7 +288,7 @@
<td>0</td>
<td>4</td>
<td>0</td>
<td>21853</td>
<td>21945</td>
<td>5</td>
</tr></tbody>
<tfoot><tr>
Expand All @@ -299,7 +299,7 @@
<th>447</th>
<th>7659</th>
<th>1529</th>
<th>254192</th>
<th>254284</th>
<th>4067</th>
</tr>
<tr>
Expand Down
14 changes: 14 additions & 0 deletions examples/language/daml.daml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
applyFilter (filter : Int -> Int -> Bool)
(x : Int)
(y : Int) = filter x y

compute = script do
applyFilter (<) 3 2 === False
applyFilter (/=) 3 2 === True

round (2.5 : Decimal) === 3
round (3.5 : Decimal) === 4

explode "me" === ["m", "e"]

applyFilter (\a b -> a /= b) 3 2 === True
18 changes: 18 additions & 0 deletions languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1650,6 +1650,24 @@
],
"shebangs": ["rdmd"]
},
"DAML": {
"complexitychecks": [
"if ",
"then ",
"else ",
"|| ",
"&& ",
"/= ",
"== ",
"case ",
"do {",
"forall "
],
"extensions": ["daml"],
"line_comment": ["--"],
"multi_line": [["{-", "-}"]],
"quotes": []
},
"DM": {
"complexitychecks": [
"for ",
Expand Down
2 changes: 1 addition & 1 deletion processor/constants.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions test-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,7 @@ specificLanguages=(
'Clipper '
'Clojure '
'Cuda '
'DAML '
'DM '
'Docker ignore '
'Dockerfile '
Expand Down

0 comments on commit f5dd53f

Please sign in to comment.