Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tree-sitter-c

Package Overview
Dependencies
Maintainers
2
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tree-sitter-c - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

22

corpus/statements.txt

@@ -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)))

12

grammar.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc