Skip to content

Add in support for C3 lang #602

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 7, 2025
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 @@ -41,6 +41,7 @@ C Shell (csh,.cshrc)
C# (cs,csx)
C++ (cc,cpp,cxx,c++,pcc,ino,ccm,cppm,cxxm,c++m,mxx)
C++ Header (hh,hpp,hxx,inl,ipp,ixx)
C3 (c3)
Cabal (cabal)
Cairo (cairo)
Cangjie (cj)
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>25</th>
<th>22135</th>
<th>22193</th>
<th>1422</th>
<th>427</th>
<th>20286</th>
<th>20344</th>
<th>1379</th>
<th>429280</th>
<th>6010</th>
<th>430107</th>
<th>6015</th>
</tr><tr>
<td>processor/constants.go</td>
<td></td>
<td>12765</td>
<td>12823</td>
<td>1</td>
<td>2</td>
<td>12762</td>
<td>12820</td>
<td>0</td>
<td>200383</td>
<td>1971</td>
<td>201210</td>
<td>1976</td>
</tr><tr>
<td>processor/workers_test.go</td>
<td></td>
Expand Down Expand Up @@ -230,16 +230,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 @@ -250,6 +240,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 @@ -274,15 +274,15 @@
<tfoot><tr>
<th>Total</th>
<th>25</th>
<th>22135</th>
<th>22193</th>
<th>1422</th>
<th>427</th>
<th>20286</th>
<th>20344</th>
<th>1379</th>
<th>429280</th>
<th>6010</th>
<th>430107</th>
<th>6015</th>
</tr>
<tr>
<th colspan="9">Estimated Cost to Develop (organic) $637,017<br>Estimated Schedule Effort (organic) 11.59 months<br>Estimated People Required (organic) 4.88<br></th>
<th colspan="9">Estimated Cost to Develop (organic) $638,930<br>Estimated Schedule Effort (organic) 11.60 months<br>Estimated People Required (organic) 4.89<br></th>
</tr></tfoot>
</table></body></html>
10 changes: 10 additions & 0 deletions examples/language/c3.c3
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// This is a comment
import std::io;

<*
Doc contracts
*>
fn void main()
{
io::printn("Hello, World!");
}
37 changes: 37 additions & 0 deletions languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,7 @@
"if(",
"switch ",
"switch(",
"case ",
"while ",
"while(",
"else ",
Expand All @@ -769,6 +770,42 @@
}
]
},
"C3": {
"complexitychecks": [
"for ",
"for(",
"foreach ",
"foreach(",
"if ",
"if(",
"switch ",
"switch(",
"case ",
"while ",
"while(",
"else ",
"|| ",
"&& ",
"!= ",
"== ",
"defer ",
"macro "
],
"extensions": ["c3"],
"line_comment": ["//"],
"multi_line": [["/*", "*/"],["<*", "*>"]],
"quotes": [
{
"end": "\"",
"start": "\""
},
{
"end": "`",
"ignoreEscape": true,
"start": "`"
}
]
},
"C Shell": {
"complexitychecks": [
"for ",
Expand Down
58 changes: 58 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 @@ -928,6 +928,7 @@ specificLanguages=(
'Bitbucket Pipeline '
'Boo '
'Bosque '
'C3 '
'C Shell '
'C# '
'Cairo '
Expand Down
Loading