mirror of https://github.com/XAMPPRocky/tokei
feat: add support for C++20 modules (#1278)
* add support for C++20 modules * add support for C++20 modules * add support for C++20 modules * add C++20 module support * add C++20 module support * fixed? param comment * hope to have fixed the lines error * hopefully actually fixed the lines error * this should fix everything * if this doesn't fix it i don't know what will
This commit is contained in:
parent
fc5cea5a12
commit
370d494723
|
|
@ -37,7 +37,7 @@
|
||||||
"name": "APL",
|
"name": "APL",
|
||||||
"line_comment": ["⍝"],
|
"line_comment": ["⍝"],
|
||||||
"extensions": ["apl", "aplf", "apls"],
|
"extensions": ["apl", "aplf", "apls"],
|
||||||
"quotes": [["'", "'"]],
|
"quotes": [["'", "'"]]
|
||||||
},
|
},
|
||||||
"Arduino": {
|
"Arduino": {
|
||||||
"name": "Arduino C++",
|
"name": "Arduino C++",
|
||||||
|
|
@ -194,7 +194,7 @@
|
||||||
"name": "BQN",
|
"name": "BQN",
|
||||||
"line_comment": ["#"],
|
"line_comment": ["#"],
|
||||||
"extensions": ["bqn"],
|
"extensions": ["bqn"],
|
||||||
"quotes": [["\\\"", "\\\""], ["'", "'"]],
|
"quotes": [["\\\"", "\\\""], ["'", "'"]]
|
||||||
},
|
},
|
||||||
"BrightScript": {
|
"BrightScript": {
|
||||||
"quotes": [["\\\"", "\\\""]],
|
"quotes": [["\\\"", "\\\""]],
|
||||||
|
|
@ -340,6 +340,14 @@
|
||||||
"quotes": [["\\\"", "\\\""]],
|
"quotes": [["\\\"", "\\\""]],
|
||||||
"extensions": ["hh", "hpp", "hxx", "inl", "ipp"]
|
"extensions": ["hh", "hpp", "hxx", "inl", "ipp"]
|
||||||
},
|
},
|
||||||
|
"CppModule": {
|
||||||
|
"name": "C++ Module",
|
||||||
|
"line_comment": ["//"],
|
||||||
|
"multi_line_comments": [["/*", "*/"]],
|
||||||
|
"quotes": [["\\\"", "\\\""]],
|
||||||
|
"verbatim_quotes": [["R\\\"(", ")\\\""]],
|
||||||
|
"extensions": ["cppm", "ixx", "ccm", "mpp", "mxx", "cxxm", "hppm", "hxxm"]
|
||||||
|
},
|
||||||
"Crystal": {
|
"Crystal": {
|
||||||
"line_comment": ["#"],
|
"line_comment": ["#"],
|
||||||
"shebangs": ["#!/usr/bin/crystal"],
|
"shebangs": ["#!/usr/bin/crystal"],
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
/* 46 lines 37 code 3 comments 6 blanks */
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
// bubble_sort_function
|
||||||
|
void bubble_sort(int a[10], int n) {
|
||||||
|
int t;
|
||||||
|
int j = n;
|
||||||
|
int s = 1;
|
||||||
|
while (s > 0) {
|
||||||
|
s = 0;
|
||||||
|
int i = 1;
|
||||||
|
while (i < j) {
|
||||||
|
if (a[i] < a[i - 1]) {
|
||||||
|
t = a[i];
|
||||||
|
a[i] = a[i - 1];
|
||||||
|
a[i - 1] = t;
|
||||||
|
s = 1;
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
j--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
int a[] = {4, 65, 2, -31, 0, 99, 2, 83, 782, 1};
|
||||||
|
int n = 10;
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
printf(R"(Before sorting:\n\n" )");
|
||||||
|
// Single line comment
|
||||||
|
while (i < n) {
|
||||||
|
printf("%d ", a[i]);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
bubble_sort(a, n);
|
||||||
|
|
||||||
|
printf("\n\nAfter sorting:\n\n");
|
||||||
|
i = 0;
|
||||||
|
while (i < n) {
|
||||||
|
printf("%d ", a[i]);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue