mirror of https://github.com/XAMPPRocky/tokei
Add support for Cairo language (#1193)
This commit is contained in:
parent
563f15395d
commit
480125cf5c
|
|
@ -192,6 +192,14 @@
|
|||
"multi_line_comments": [["{-", "-}"]],
|
||||
"extensions": ["cabal"]
|
||||
},
|
||||
"Cairo": {
|
||||
"line_comment": ["//"],
|
||||
"extensions": ["cairo"],
|
||||
"quotes": [
|
||||
["\\\"", "\\\""],
|
||||
["'", "'"]
|
||||
]
|
||||
},
|
||||
"Cangjie": {
|
||||
"line_comment": ["//"],
|
||||
"multi_line_comments": [["/*", "*/"]],
|
||||
|
|
|
|||
|
|
@ -0,0 +1,51 @@
|
|||
//! 51 lines 32 code 13 comments 6 blanks
|
||||
//! ```rust
|
||||
//! fn main () {
|
||||
//! // Comment
|
||||
//!
|
||||
//! println!("Hello World!");
|
||||
//! }
|
||||
//! ```
|
||||
|
||||
/// The main function
|
||||
fn main() {
|
||||
let x: ByteArray = "\"/*##\"\"##\'\'";
|
||||
// comment
|
||||
loop {
|
||||
if x.len() >= 2 && x[0] == '*' && x[1] == '/' { // found the */
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn foo<T, +Drop<T>>(name: T) {
|
||||
let this_ends = 'a "\'test/"*.';
|
||||
call1();
|
||||
call2();
|
||||
let this_does_not = // a // nested // comment " //
|
||||
///"*/another /*test
|
||||
call3();
|
||||
//*/";
|
||||
}
|
||||
|
||||
fn call1() {}
|
||||
fn call2() {}
|
||||
fn call3() {}
|
||||
|
||||
fn foobar() {
|
||||
let does_not_start: ByteArray = // "
|
||||
"until here,
|
||||
test/*
|
||||
test"; // a quote: "
|
||||
let also_doesnt_start =
|
||||
/// " */
|
||||
'until here,
|
||||
test,'; // another quote: "
|
||||
}
|
||||
|
||||
fn foo2() {
|
||||
let a = 4; // ///
|
||||
let b = '5';
|
||||
let c = 6; // ///
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue