Skip to content
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1283,6 +1283,7 @@ Python (buck, build.bazel, gclient, gyp, gypi, lmi, py, py3,
pyt, pyw, sconscript, sconstruct, snakefile, tac, workspace, wscript,
wsgi, xpy)
QML (qbs, qml)
Quxlang (qxs)
Qt Linguist (ts)
Qt Project (pro)
R (expr-dist, R, r, rd, rprofile, rsx)
Expand Down
5 changes: 5 additions & 0 deletions Unix/t/00_C.t
Original file line number Diff line number Diff line change
Expand Up @@ -1166,6 +1166,11 @@ my @Tests = (
'ref' => '../tests/outputs/test-1.0-py2.py3-none-win32.whl.yaml',
'args' => '../tests/inputs/test-1.0-py2.py3-none-win32.whl',
},
{
'name' => 'Quxlang',
'ref' => '../tests/outputs/sample.qxs.yaml',
'args' => '../tests/inputs/sample.qxs',
},
{
'name' => 'Qt Linguist',
'ref' => '../tests/outputs/i18n_de.ts.yaml',
Expand Down
9 changes: 9 additions & 0 deletions cloc
Original file line number Diff line number Diff line change
Expand Up @@ -9432,6 +9432,7 @@ sub set_constants { # {{{1
'pyx' => 'Cython' ,
'qbs' => 'QML' ,
'qml' => 'QML' ,
'qxs' => 'Quxlang' ,
'watchr' => 'Ruby' ,
'vagrantfile' => 'Ruby' ,
'thorfile' => 'Ruby' ,
Expand Down Expand Up @@ -11195,6 +11196,13 @@ sub set_constants { # {{{1
[ 'remove_matches' , '^\s*#' ],
[ 'remove_inline' , '#.*$' ],
],
'Quxlang' => [
[ 'remove_between_regex', '\bDOC\s*<\$', '\$>' ],
[ 'rm_comments_in_strings', '"', '//', '' ],
[ 'rm_comments_in_strings', "'", '//', '' ],
[ 'remove_matches' , '^\s*//' ],
[ 'remove_inline' , '//.*$' ],
],
'R' => [
[ 'remove_matches' , '^\s*#' ],
[ 'remove_inline' , '#.*$' ],
Expand Down Expand Up @@ -12294,6 +12302,7 @@ sub set_constants { # {{{1
'XML (Qt/GTK)' => 2.00,
'Qt Linguist' => 1.00,
'Qt Project' => 1.00,
'Quxlang' => 1.75,
'R' => 3.00,
'Rmd' => 3.00,
'Racket' => 1.50,
Expand Down
23 changes: 23 additions & 0 deletions tests/inputs/sample.qxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Quxlang source fixture.

::url STATIC STRING_CONSTANT := "https://example.test//not-comment";

::documented DOC <$
Summary line still doc text.
more text
$> STATIC STRING_CONSTANT := "documented";
::multi_doc DOC <$
bla bla
bla bla
$> STATIC STRING_CONSTANT := "multi";
::inline_doc DOC <$ one line doc $> FUNCTION()
{
}
::slash STATIC BYTE := '/'; // Inline comment after a char literal.
::main FUNCTION()
{
VAR text STRING_CONSTANT := "value // not a comment";
VAR slash BYTE := '/';
// Body comment.
RETURN;
}
21 changes: 21 additions & 0 deletions tests/outputs/sample.qxs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
# github.com/AlDanial/cloc
header :
cloc_url : github.com/AlDanial/cloc
cloc_version : 2.09
elapsed_seconds : 0.00587797164916992
n_files : 1
n_lines : 23
files_per_second : 170.126713717855
lines_per_second : 3912.91441551067
report_file : sample.qxs.yaml
'Quxlang' :
nFiles: 1
blank: 2
comment: 6
code: 15
SUM:
blank: 2
comment: 6
code: 15
nFiles: 1