Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions LANGUAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Alchemist (crn)
Alex (x)
Algol 68 (a68)
Alloy (als)
Amber (ab)
Android Interface Definition Language (aidl)
APL (apl,aplf,apln,aplc,dyalog)
AppleScript (applescript)
Expand Down
46 changes: 23 additions & 23 deletions SCC-OUTPUT-REPORT.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@
<tbody><tr>
<th>Go</th>
<th>29</th>
<th>23873</th>
<th>23914</th>
<th>1473</th>
<th>455</th>
<th>21945</th>
<th>21986</th>
<th>1446</th>
<th>465715</th>
<th>6543</th>
<th>466340</th>
<th>6550</th>
</tr><tr>
<td>processor/constants.go</td>
<td></td>
<td>13652</td>
<td>13693</td>
<td>1</td>
<td>2</td>
<td>13649</td>
<td>13690</td>
<td>0</td>
<td>214192</td>
<td>2104</td>
<td>214817</td>
<td>2111</td>
</tr><tr>
<td>processor/formatters_test.go</td>
<td></td>
Expand Down Expand Up @@ -270,16 +270,6 @@
<td>0</td>
<td>2209</td>
<td>35</td>
</tr><tr>
<td>processor/bloom.go</td>
<td></td>
<td>37</td>
<td>7</td>
<td>12</td>
<td>18</td>
<td>2</td>
<td>1062</td>
<td>29</td>
</tr><tr>
<td>processor/cocomo_test.go</td>
<td></td>
Expand All @@ -290,6 +280,16 @@
<td>6</td>
<td>686</td>
<td>23</td>
</tr><tr>
<td>processor/bloom.go</td>
<td></td>
<td>37</td>
<td>7</td>
<td>12</td>
<td>18</td>
<td>2</td>
<td>1062</td>
<td>29</td>
</tr><tr>
<td>processor/helpers_test.go</td>
<td></td>
Expand All @@ -314,15 +314,15 @@
<tfoot><tr>
<th>Total</th>
<th>29</th>
<th>23873</th>
<th>23914</th>
<th>1473</th>
<th>455</th>
<th>21945</th>
<th>21986</th>
<th>1446</th>
<th>465715</th>
<th>6543</th>
<th>466340</th>
<th>6550</th>
</tr>
<tr>
<th colspan="9">Estimated Cost to Develop (organic) $691,827<br>Estimated Schedule Effort (organic) 11.96 months<br>Estimated People Required (organic) 5.14<br></th>
<th colspan="9">Estimated Cost to Develop (organic) $693,184<br>Estimated Schedule Effort (organic) 11.97 months<br>Estimated People Required (organic) 5.15<br></th>
</tr></tfoot>
</table></body></html>
50 changes: 50 additions & 0 deletions examples/language/Amber.ab
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/usr/bin/env amber
import {
date_format_posix,
date_now,
} from "std/date"

fun collatz(num: Int): [Int]? {
if num <= 0 {
// num must not be zero
fail 1
}
let res = [num]
while num > 1 {
if num%2 == 0 {
num /= 2
res += [num]
} else {
num *= 3
num += 1
res += [num]
}
}
return res
}

fun print_array(ref arr: [Int]): Text {
let res = "["
for i, e in arr {
res += e as Text
if i != len(arr)-1 {
res += ", "
}
}
res += "]"
return res
}

main {
echo "start: {date_format_posix(date_now())?}\n"

for i in 0..=20 {
let c = collatz(i) failed(code) {
echo "{i}: error {code}, collatz for {i} does not exist"
continue
}
echo "{i}: {print_array(c)}"
}

echo "\nend: {date_format_posix(date_now())?}"
}
30 changes: 30 additions & 0 deletions languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,36 @@
"multi_line": [["/*", "*/"]],
"quotes": []
},
"Amber": {
"complexitychecks": [
"for ",
"exited(",
"failed ",
"failed(",
"succeeded ",
"if ",
"then ",
"while ",
"loop ",
"else:",
"else ",
"or ",
"and ",
"!= ",
"== "
],
"extensions": ["ab"],
"filenames": [],
"line_comment": ["//"],
"multi_line": [],
"quotes": [
{
"end": "\"",
"start": "\""
}
],
"shebangs": ["amber"]
},
"Android Interface Definition Language": {
"complexitychecks": [
"for ",
Expand Down
41 changes: 41 additions & 0 deletions processor/constants.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions test-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,7 @@ specificLanguages=(
'Alchemist '
'Algol 68 '
'Alloy '
'Amber '
'ArkTs '
'Arturo '
'Astro '
Expand Down
Loading