Add support for Cap n Proto (#463) · boyter/scc@62f06df

6 files changed

lines changed

Original file line numberDiff line numberDiff line change

@@ -40,6 +40,7 @@ C++ (cc,cpp,cxx,c++,pcc,ino)

4040

C++ Header (hh,hpp,hxx,inl,ipp)

4141

Cabal (cabal)

4242

Cairo (cairo)

43+

Cap'n Proto (capnp)

4344

Cassius (cassius)

4445

Ceylon (ceylon)

4546

Chapel (chpl)

Original file line numberDiff line numberDiff line change

@@ -18,7 +18,7 @@

1818

<th>458</th>

1919

<th>7545</th>

2020

<th>1542</th>

21-

<th>406094</th>

21+

<th>406318</th>

2222

<th>4017</th>

2323

</tr><tr>

2424

<td>processor/formatters.go</td>

@@ -270,16 +270,6 @@

270270

<td>6</td>

271271

<td>699</td>

272272

<td>23</td>

273-

</tr><tr>

274-

<td>processor/helpers.go</td>

275-

<td></td>

276-

<td>32</td>

277-

<td>6</td>

278-

<td>4</td>

279-

<td>22</td>

280-

<td>2</td>

281-

<td>544</td>

282-

<td>21</td>

283273

</tr><tr>

284274

<td>processor/structs_test.go</td>

285275

<td></td>

@@ -290,6 +280,16 @@

290280

<td>4</td>

291281

<td>517</td>

292282

<td>19</td>

283+

</tr><tr>

284+

<td>processor/helpers.go</td>

285+

<td></td>

286+

<td>32</td>

287+

<td>6</td>

288+

<td>4</td>

289+

<td>22</td>

290+

<td>2</td>

291+

<td>544</td>

292+

<td>21</td>

293293

</tr><tr>

294294

<td>processor/processor_unix_test.go</td>

295295

<td></td>

@@ -318,7 +318,7 @@

318318

<td>0</td>

319319

<td>4</td>

320320

<td>0</td>

321-

<td>175605</td>

321+

<td>175829</td>

322322

<td>5</td>

323323

</tr></tbody>

324324

<tfoot><tr>

@@ -329,7 +329,7 @@

329329

<th>458</th>

330330

<th>7545</th>

331331

<th>1542</th>

332-

<th>406094</th>

332+

<th>406318</th>

333333

<th>4017</th>

334334

</tr>

335335

<tr>

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,26 @@

1+

@0xdbb9ad1f14bf0b36; # unique file ID, generated by `capnp id`

2+
3+

struct Person {

4+

name @0 :Text;

5+

birthdate @3 :Date;

6+
7+

email @1 :Text;

8+

phones @2 :List(PhoneNumber);

9+
10+

struct PhoneNumber {

11+

number @0 :Text;

12+

type @1 :Type;

13+
14+

enum Type {

15+

mobile @0;

16+

home @1;

17+

work @2;

18+

}

19+

}

20+

}

21+
22+

struct Date {

23+

year @0 :Int16;

24+

month @1 :UInt8;

25+

day @2 :UInt8;

26+

}

Original file line numberDiff line numberDiff line change

@@ -1213,6 +1213,17 @@

12131213

}

12141214

]

12151215

},

1216+

"Cap'n Proto": {

1217+

"complexitychecks": [],

1218+

"extensions": [

1219+

"capnp"

1220+

],

1221+

"line_comment": [

1222+

"#"

1223+

],

1224+

"multi_line": [],

1225+

"quotes": []

1226+

},

12161227

"Cassius": {

12171228

"complexitychecks": [

12181229

"for ",

@@ -8987,6 +8998,24 @@

89878998

}

89888999

]

89899000

},

9001+

"Web Services Description Language": {

9002+

"extensions": [

9003+

"wsdl"

9004+

],

9005+

"line_comment": [],

9006+

"multi_line": [

9007+

[

9008+

"<!--",

9009+

"-->"

9010+

]

9011+

],

9012+

"quotes": [

9013+

{

9014+

"end": "\"",

9015+

"start": "\""

9016+

}

9017+

]

9018+

},

89909019

"WebGPU Shading Language": {

89919020

"complexitychecks": [

89929021

"for (",

@@ -9015,24 +9044,6 @@

90159044

]

90169045

]

90179046

},

9018-

"Web Services Description Language": {

9019-

"extensions": [

9020-

"wsdl"

9021-

],

9022-

"line_comment": [],

9023-

"multi_line": [

9024-

[

9025-

"<!--",

9026-

"-->"

9027-

]

9028-

],

9029-

"quotes": [

9030-

{

9031-

"end": "\"",

9032-

"start": "\""

9033-

}

9034-

]

9035-

},

90369047

"Windows Resource-Definition Script": {

90379048

"extensions": [

90389049

"rc"

@@ -9379,4 +9390,4 @@

93799390

"zsh"

93809391

]

93819392

}

9382-

}

9393+

}

Original file line numberDiff line numberDiff line change

@@ -906,7 +906,7 @@ else

906906

fi

907907
908908

# Try out specific languages

909-

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 ' 'Slang ' 'Circom '

909+

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 ' 'Slang ' 'Circom ' 'Proto '

910910

do

911911

if ./scc "examples/language/" | grep -q "$i "; then

912912

echo -e "${GREEN}PASSED $i Language Check"