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

tree-sitter-json

Package Overview
Dependencies
Maintainers
7
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tree-sitter-json - npm Package Compare versions

Comparing version 0.19.0 to 0.20.0

.github/workflows/ci.yml

24

grammar.js

@@ -5,3 +5,4 @@ module.exports = grammar({

extras: $ => [
/\s/
/\s/,
$.comment,
],

@@ -52,3 +53,3 @@

'\\',
/(\"|\\|\/|b|n|r|t|u)/
/(\"|\\|\/|b|f|n|r|t|u)/
)),

@@ -63,3 +64,3 @@

const decimal_digits = /\d+/
const signed_integer = seq(optional(choice('-','+')), decimal_digits)
const signed_integer = seq(optional(choice('-', '+')), decimal_digits)
const exponent_part = seq(choice('e', 'E'), signed_integer)

@@ -72,3 +73,3 @@

const decimal_integer_literal = seq(
optional(choice('-','+')),
optional(choice('-', '+')),
choice(

@@ -98,12 +99,21 @@ '0',

null: $ => "null"
null: $ => "null",
comment: $ => token(choice(
seq('//', /.*/),
seq(
'/*',
/[^*]*\*+([^/*][^*]*\*+)*/,
'/'
)
)),
}
});
function commaSep1 (rule) {
function commaSep1(rule) {
return seq(rule, repeat(seq(",", rule)))
}
function commaSep (rule) {
function commaSep(rule) {
return optional(commaSep1(rule))
}
{
"name": "tree-sitter-json",
"version": "0.19.0",
"version": "0.20.0",
"description": "JSON grammar for tree-sitter",

@@ -5,0 +5,0 @@ "main": "bindings/node",

tree-sitter-json
===========================
[![Build Status](https://travis-ci.org/tree-sitter/tree-sitter-json.svg?branch=master)](https://travis-ci.org/tree-sitter/tree-sitter-json)
[![Build/test](https://github.com/tree-sitter/tree-sitter-json/actions/workflows/ci.yml/badge.svg)](https://github.com/tree-sitter/tree-sitter-json/actions/workflows/ci.yml)
JSON grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter)

@@ -232,3 +232,3 @@ {

"type": "PATTERN",
"value": "(\\\"|\\\\|\\/|b|n|r|t|u)"
"value": "(\\\"|\\\\|\\/|b|f|n|r|t|u)"
}

@@ -647,2 +647,40 @@ ]

"value": "null"
},
"comment": {
"type": "TOKEN",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "//"
},
{
"type": "PATTERN",
"value": ".*"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "/*"
},
{
"type": "PATTERN",
"value": "[^*]*\\*+([^/*][^*]*\\*+)*"
},
{
"type": "STRING",
"value": "/"
}
]
}
]
}
}

@@ -654,2 +692,6 @@ },

"value": "\\s"
},
{
"type": "SYMBOL",
"name": "comment"
}

@@ -656,0 +698,0 @@ ],

@@ -162,2 +162,6 @@ [

{
"type": "comment",
"named": true
},
{
"type": "escape_sequence",

@@ -164,0 +168,0 @@ "named": true

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

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