tree-sitter-c
Advanced tools
Comparing version 0.13.10 to 0.13.11
@@ -35,3 +35,2 @@ const PREC = { | ||
$._top_level_item, | ||
$._compound_statement_item, | ||
$._type_identifier, | ||
@@ -71,15 +70,2 @@ $._field_identifier, | ||
_compound_statement_item: $ => choice( | ||
$._statement, | ||
$.declaration, | ||
$.type_definition, | ||
$._empty_declaration, | ||
alias($.preproc_if_in_compound_statement, $.preproc_if), | ||
alias($.preproc_ifdef_in_compound_statement, $.preproc_ifdef), | ||
$.preproc_include, | ||
$.preproc_def, | ||
$.preproc_function_def, | ||
$.preproc_call | ||
), | ||
// Preprocesser | ||
@@ -118,3 +104,2 @@ | ||
...preprocIf('', $ => $._top_level_item), | ||
...preprocIf('_in_compound_statement', $ => $._compound_statement_item), | ||
...preprocIf( '_in_field_declaration_list', $ => $._field_declaration_list_item), | ||
@@ -146,3 +131,3 @@ | ||
$._type_specifier, | ||
$._type_declarator, | ||
commaSep1($._type_declarator), | ||
';' | ||
@@ -257,3 +242,3 @@ ), | ||
'{', | ||
repeat($._compound_statement_item), | ||
repeat($._top_level_item), | ||
'}' | ||
@@ -366,2 +351,5 @@ ), | ||
$.field_declaration, | ||
$.preproc_def, | ||
$.preproc_function_def, | ||
$.preproc_call, | ||
alias($.preproc_if_in_field_declaration_list, $.preproc_if), | ||
@@ -684,8 +672,7 @@ alias($.preproc_ifdef_in_field_declaration_list, $.preproc_ifdef), | ||
choice( | ||
/\d+(\.\d+)?/, | ||
/\d+u/, | ||
/\d+('\d+)*(\.\d+('\d+)*)?/, | ||
seq('0x', /[0-9a-fA-f]+/), | ||
seq('0b', /[01]+/) | ||
), | ||
repeat(choice('u', 'l', 'U', 'L')) | ||
repeat(choice('u', 'l', 'U', 'L', 'f', 'F')) | ||
)), | ||
@@ -710,3 +697,3 @@ | ||
repeat(choice( | ||
token.immediate(prec(1, /[^\\"\n]/)), | ||
token.immediate(prec(1, /[^\\"\n]+/)), | ||
$.escape_sequence | ||
@@ -758,3 +745,3 @@ )), | ||
comment: $ => token(choice( | ||
seq('//', /.*/), | ||
seq('//', /(\\[.\n]|[^\\\n])*/), | ||
seq( | ||
@@ -761,0 +748,0 @@ '/*', |
{ | ||
"name": "tree-sitter-c", | ||
"version": "0.13.10", | ||
"version": "0.13.11", | ||
"description": "C grammar for node-tree-sitter", | ||
@@ -16,8 +16,9 @@ "main": "index.js", | ||
"devDependencies": { | ||
"tree-sitter-cli": "^0.13.6" | ||
"tree-sitter-cli": "^0.14.5" | ||
}, | ||
"scripts": { | ||
"build": "tree-sitter generate && node-gyp build", | ||
"test": "tree-sitter test && tree-sitter parse examples/* --quiet --time" | ||
"test": "tree-sitter test && tree-sitter parse examples/* --quiet --time", | ||
"test-windows": "tree-sitter test" | ||
} | ||
} |
@@ -5,3 +5,4 @@ tree-sitter-c | ||
[![Build Status](https://travis-ci.org/tree-sitter/tree-sitter-c.svg?branch=master)](https://travis-ci.org/tree-sitter/tree-sitter-c) | ||
[![Build status](https://ci.appveyor.com/api/projects/status/7u0sy6ajmxro4wfh/branch/master?svg=true)](https://ci.appveyor.com/project/maxbrunsfeld/tree-sitter-c/branch/master) | ||
C grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter). Adapted from [this C99 grammar](http://slps.github.io/zoo/c/iso-9899-tc3.html). |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13
8
2321873
4915