Skip to content

Commit ac98feb

Browse files
authored
Gleam support (#520)
1 parent f4b1daa commit ac98feb

File tree

6 files changed

+40
-4
lines changed

6 files changed

+40
-4
lines changed

LANGUAGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ GDScript (gd)
104104
Gemfile (gemfile)
105105
Gherkin Specification (feature)
106106
gitignore (.gitignore)
107+
Gleam (gleam)
107108
GLSL (vert,tesc,tese,geom,frag,comp)
108109
GN (gn,gni)
109110
Go (go)

SCC-OUTPUT-REPORT.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<th>447</th>
1919
<th>7659</th>
2020
<th>1529</th>
21-
<th>253860</th>
21+
<th>253872</th>
2222
<th>4067</th>
2323
</tr><tr>
2424
<td>processor/formatters.go</td>
@@ -288,7 +288,7 @@
288288
<td>0</td>
289289
<td>4</td>
290290
<td>0</td>
291-
<td>21521</td>
291+
<td>21533</td>
292292
<td>5</td>
293293
</tr></tbody>
294294
<tfoot><tr>
@@ -299,7 +299,7 @@
299299
<th>447</th>
300300
<th>7659</th>
301301
<th>1529</th>
302-
<th>253860</th>
302+
<th>253872</th>
303303
<th>4067</th>
304304
</tr>
305305
<tr>

examples/language/gleam.gleam

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import gleam/int
2+
import gleam/io
3+
4+
pub fn main() {
5+
let x = int.random(2)
6+
let y = int.random(2)
7+
io.debug(x)
8+
io.debug(y)
9+
10+
let result = case x, y {
11+
0, 0 -> "Both are zero"
12+
0, _ -> "First is zero"
13+
_, 0 -> "Second is zero"
14+
_, _ -> "Neither are zero"
15+
}
16+
io.debug(result)
17+
}

languages.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3001,6 +3001,23 @@
30013001
}
30023002
]
30033003
},
3004+
"Gleam": {
3005+
"complexitychecks": [
3006+
"fn ",
3007+
"case ",
3008+
"-> ",
3009+
"if "
3010+
],
3011+
"extensions": ["gleam"],
3012+
"line_comment": ["//", "///", "////"],
3013+
"multi_line": [],
3014+
"quotes": [
3015+
{
3016+
"end": "\"",
3017+
"start": "\""
3018+
}
3019+
]
3020+
},
30043021
"JavaScript": {
30053022
"complexitychecks": [
30063023
"for ",

processor/constants.go

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

test-all.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -947,6 +947,7 @@ specificLanguages=(
947947
'Futhark '
948948
'FXML '
949949
'Gemfile '
950+
'Gleam '
950951
'Go '
951952
'GraphQL '
952953
'Gwion '

0 commit comments

Comments
 (0)