Skip to content

Commit

Permalink
Add support for chapel
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter committed May 6, 2024
1 parent bb0db7d commit 266c063
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 22 deletions.
1 change: 1 addition & 0 deletions LANGUAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Cabal (cabal)
Cairo (cairo)
Cassius (cassius)
Ceylon (ceylon)
Chapel (chpl)
Clojure (clj,cljc)
ClojureScript (cljs)
Closure Template (soy)
Expand Down
40 changes: 20 additions & 20 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>399813</th>
<th>400453</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/helpers.go</td>
<td></td>
<td>37</td>
<td>8</td>
<td>4</td>
<td>25</td>
<td>32</td>
<td>6</td>
<td>699</td>
<td>23</td>
<td>4</td>
<td>22</td>
<td>2</td>
<td>544</td>
<td>21</td>
</tr><tr>
<td>processor/structs_test.go</td>
<td></td>
Expand All @@ -280,16 +290,6 @@
<td>4</td>
<td>517</td>
<td>19</td>
</tr><tr>
<td>processor/helpers.go</td>
<td></td>
<td>32</td>
<td>6</td>
<td>4</td>
<td>22</td>
<td>2</td>
<td>544</td>
<td>21</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>173325</td>
<td>173965</td>
<td>5</td>
</tr></tbody>
<tfoot><tr>
Expand All @@ -329,7 +329,7 @@
<th>453</th>
<th>7424</th>
<th>1516</th>
<th>399813</th>
<th>400453</th>
<th>3929</th>
</tr>
<tr>
Expand Down
14 changes: 14 additions & 0 deletions examples/language/chapel.chpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
class Integer {
var x:int;
}
proc deferInFunction() {
var c = new unmanaged Integer(1);
writeln("created ", c);
defer {
writeln("defer action: deleting ", c);
delete c;
}
// ... (function body, possibly including return statements)
// The defer action is executed no matter how this function returns.
}
deferInFunction();
36 changes: 36 additions & 0 deletions languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1279,6 +1279,42 @@
}
]
},
"Chapel": {
"complexitychecks": [
"for ",
"if ",
"switch ",
"while ",
"else ",
"do ",
"|| ",
"&& ",
"!= ",
"== "
],
"extensions": [
"chpl"
],
"line_comment": [
"//"
],
"multi_line": [
[
"/*",
"*/"
]
],
"quotes": [
{
"end": "\"",
"start": "\""
},
{
"end": "'",
"start": "'"
}
]
},
"Clojure": {
"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 ' 'ZoKrates '
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 ' 'Chapel '
do
if ./scc "examples/language/" | grep -q "$i "; then
echo -e "${GREEN}PASSED $i Language Check"
Expand Down

0 comments on commit 266c063

Please sign in to comment.