tree-sitter-c
Advanced tools
Comparing version 0.4.1 to 0.4.2
@@ -112,1 +112,23 @@ ============================================ | ||
(if_statement (identifier) (goto_statement (statement_identifier)))))) | ||
============================================ | ||
Comments with asterisks | ||
============================================ | ||
/************************* | ||
* odd number of asterisks | ||
*************************/ | ||
int a; | ||
/************************** | ||
* even number of asterisks | ||
**************************/ | ||
int b; | ||
--- | ||
(translation_unit | ||
(comment) | ||
(declaration (type_identifier) (identifier)) | ||
(comment) | ||
(declaration (type_identifier) (identifier))) |
@@ -709,13 +709,11 @@ const PREC = { | ||
// http://stackoverflow.com/questions/13014947/regex-to-match-a-c-style-multiline-comment/36328890#36328890 | ||
comment: $ => token(choice( | ||
seq('//', /.*/), | ||
seq( | ||
'//', | ||
/.*/ | ||
), | ||
seq( | ||
'/*', | ||
repeat(choice(/[^\*]/, /\*[^/]/)), | ||
'*/' | ||
/[^*]*\*+([^/*][^*]*\*+)*/, | ||
'/' | ||
) | ||
)) | ||
)), | ||
} | ||
@@ -722,0 +720,0 @@ }); |
{ | ||
"name": "tree-sitter-c", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "C grammar for node-tree-sitter", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
2766380
4300