tree-sitter-c
Advanced tools
Comparing version 0.23.0 to 0.23.1
@@ -305,3 +305,3 @@ /** | ||
attribute_specifier: $ => seq( | ||
'__attribute__', | ||
choice('__attribute__', '__attribute'), | ||
'(', | ||
@@ -627,2 +627,3 @@ $.argument_list, | ||
)), | ||
repeat($.type_qualifier), | ||
field('type', optional(choice( | ||
@@ -775,2 +776,3 @@ prec.dynamic(-1, $._type_identifier), | ||
))), | ||
repeat($.attribute_specifier), | ||
), | ||
@@ -833,3 +835,3 @@ | ||
_top_level_expression_statement: $ => seq( | ||
$._expression_not_binary, | ||
optional($._expression_not_binary), | ||
';', | ||
@@ -1150,2 +1152,3 @@ ), | ||
'volatile', | ||
'__volatile__', | ||
'inline', | ||
@@ -1168,3 +1171,3 @@ 'goto', | ||
'(', | ||
field('value', $.identifier), | ||
field('value', $.expression), | ||
')', | ||
@@ -1325,3 +1328,3 @@ ), | ||
/\d{2,3}/, | ||
/x[0-9a-fA-F]{2,}/, | ||
/x[0-9a-fA-F]{1,4}/, | ||
/u[0-9a-fA-F]{4}/, | ||
@@ -1343,3 +1346,2 @@ /U[0-9a-fA-F]{8}/, | ||
identifier: _ => | ||
// eslint-disable-next-line max-len | ||
/(\p{XID_Start}|\$|_|\\u[0-9A-Fa-f]{4}|\\U[0-9A-Fa-f]{8})(\p{XID_Continue}|\$|\\u[0-9A-Fa-f]{4}|\\U[0-9A-Fa-f]{8})*/, | ||
@@ -1388,12 +1390,11 @@ | ||
* | ||
* @return {RuleBuilders<string, string>} | ||
* @returns {RuleBuilders<string, string>} | ||
*/ | ||
function preprocIf(suffix, content, precedence = 0) { | ||
/** | ||
* | ||
* @param {GrammarSymbols<string>} $ | ||
* | ||
* @return {ChoiceRule} | ||
* | ||
*/ | ||
* | ||
* @param {GrammarSymbols<string>} $ | ||
* | ||
* @returns {ChoiceRule} | ||
*/ | ||
function alternativeBlock($) { | ||
@@ -1448,8 +1449,8 @@ return choice( | ||
/** | ||
* Creates a preprocessor regex rule | ||
* | ||
* @param {RegExp|Rule|String} command | ||
* | ||
* @return {AliasRule} | ||
*/ | ||
* Creates a preprocessor regex rule | ||
* | ||
* @param {RegExp | Rule | string} command | ||
* | ||
* @returns {AliasRule} | ||
*/ | ||
function preprocessor(command) { | ||
@@ -1464,4 +1465,3 @@ return alias(new RegExp('#[ \t]*' + command), '#' + command); | ||
* | ||
* @return {ChoiceRule} | ||
* | ||
* @returns {ChoiceRule} | ||
*/ | ||
@@ -1477,4 +1477,3 @@ function commaSep(rule) { | ||
* | ||
* @return {SeqRule} | ||
* | ||
* @returns {SeqRule} | ||
*/ | ||
@@ -1481,0 +1480,0 @@ function commaSep1(rule) { |
{ | ||
"name": "tree-sitter-c", | ||
"version": "0.23.0", | ||
"version": "0.23.1", | ||
"description": "C grammar for tree-sitter", | ||
@@ -25,3 +25,4 @@ "repository": "github:tree-sitter/tree-sitter-c", | ||
"queries/*", | ||
"src/**" | ||
"src/**", | ||
"*.wasm" | ||
], | ||
@@ -33,4 +34,4 @@ "dependencies": { | ||
"devDependencies": { | ||
"eslint": "^8.57.0", | ||
"eslint-config-google": "^0.14.0", | ||
"eslint": "^9.11.0", | ||
"eslint-config-treesitter": "^1.0.2", | ||
"prebuildify": "^6.0.1", | ||
@@ -65,45 +66,3 @@ "tree-sitter-cli": "^0.23.0" | ||
} | ||
], | ||
"eslintConfig": { | ||
"env": { | ||
"commonjs": true, | ||
"es2021": true | ||
}, | ||
"extends": "google", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"arrow-parens": "off", | ||
"camel-case": "off", | ||
"indent": [ | ||
"error", | ||
2, | ||
{ | ||
"SwitchCase": 1 | ||
} | ||
], | ||
"max-len": [ | ||
"error", | ||
{ | ||
"code": 160, | ||
"ignoreComments": true, | ||
"ignoreUrls": true, | ||
"ignoreStrings": true | ||
} | ||
], | ||
"spaced-comment": [ | ||
"warn", | ||
"always", | ||
{ | ||
"line": { | ||
"markers": [ | ||
"/" | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 3 instances 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
8984901
24
15687
8