@lezer/json
Advanced tools
Comparing version 0.15.0 to 0.16.0
@@ -0,1 +1,11 @@ | ||
## 0.16.0 (2022-04-20) | ||
### Breaking changes | ||
Move to 0.16 serialized parser format. | ||
### New features | ||
The parser now includes syntax highlighting information in its node types. | ||
## 0.15.0 (2021-08-11) | ||
@@ -2,0 +12,0 @@ |
import { LRParser } from '@lezer/lr'; | ||
import { NodeProp } from '@lezer/common'; | ||
import { styleTags, tags } from '@lezer/highlight'; | ||
const jsonHighlighting = styleTags({ | ||
String: tags.string, | ||
Number: tags.number, | ||
"True False": tags.bool, | ||
PropertyName: tags.propertyName, | ||
Null: tags.null, | ||
",": tags.separator, | ||
"[ ]": tags.squareBracket, | ||
"{ }": tags.brace | ||
}); | ||
// This file was generated by lezer-generator. You probably shouldn't edit it. | ||
const parser = LRParser.deserialize({ | ||
version: 13, | ||
version: 14, | ||
states: "$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j", | ||
@@ -13,5 +24,6 @@ stateData: "#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O", | ||
nodeProps: [ | ||
[NodeProp.openedBy, 7,"{",12,"["], | ||
[NodeProp.closedBy, 8,"}",13,"]"] | ||
["openedBy", 7,"{",12,"["], | ||
["closedBy", 8,"}",13,"]"] | ||
], | ||
propSources: [jsonHighlighting], | ||
skippedNodes: [0], | ||
@@ -18,0 +30,0 @@ repeatNodeCount: 2, |
{ | ||
"name": "@lezer/json", | ||
"version": "0.15.0", | ||
"version": "0.16.0", | ||
"description": "lezer-based JSON grammar", | ||
@@ -16,3 +16,3 @@ "main": "dist/index.cjs", | ||
"devDependencies": { | ||
"@lezer/generator": "^0.15.0", | ||
"@lezer/generator": "^0.16.0", | ||
"mocha": "^9.0.1", | ||
@@ -23,3 +23,4 @@ "rollup": "^2.52.2", | ||
"dependencies": { | ||
"@lezer/lr": "^0.15.0" | ||
"@lezer/highlight": "^0.16.0", | ||
"@lezer/lr": "^0.16.0" | ||
}, | ||
@@ -26,0 +27,0 @@ "repository": { |
@@ -1,2 +0,2 @@ | ||
# lezer-json | ||
# @lezer/json | ||
@@ -3,0 +3,0 @@ This is a JSON grammar for the [lezer](https://lezer.codemirror.net/) parser system. |
// This file was generated by lezer-generator. You probably shouldn't edit it. | ||
import {LRParser} from "@lezer/lr" | ||
import {NodeProp} from "@lezer/common" | ||
import {jsonHighlighting} from "./highlight" | ||
export const parser = LRParser.deserialize({ | ||
version: 13, | ||
version: 14, | ||
states: "$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j", | ||
@@ -12,5 +12,6 @@ stateData: "#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O", | ||
nodeProps: [ | ||
[NodeProp.openedBy, 7,"{",12,"["], | ||
[NodeProp.closedBy, 8,"}",13,"]"] | ||
["openedBy", 7,"{",12,"["], | ||
["closedBy", 8,"}",13,"]"] | ||
], | ||
propSources: [jsonHighlighting], | ||
skippedNodes: [0], | ||
@@ -17,0 +18,0 @@ repeatNodeCount: 2, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
12790
18
152
2
+ Added@lezer/highlight@^0.16.0
+ Added@lezer/common@0.16.1(transitive)
+ Added@lezer/highlight@0.16.0(transitive)
+ Added@lezer/lr@0.16.3(transitive)
- Removed@lezer/common@0.15.12(transitive)
- Removed@lezer/lr@0.15.8(transitive)
Updated@lezer/lr@^0.16.0