Socket
Socket
Sign inDemoInstall

lezer-tree

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lezer-tree - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 0.5.1 (2019-10-22)
### New features
`NodeProp.add` now also allows a selector object to be passed.
## 0.5.0 (2019-10-22)

@@ -2,0 +8,0 @@

4

dist/tree.d.ts

@@ -37,3 +37,5 @@ export declare const DefaultBufferLength = 1024;

};
add(f: (type: NodeType) => T | undefined): NodePropSource;
add(match: {
[selector: string]: T;
} | ((type: NodeType) => T | undefined)): NodePropSource;
static error: NodeProp<boolean>;

@@ -40,0 +42,0 @@ static skipped: NodeProp<boolean>;

@@ -69,6 +69,9 @@ "use strict";

/// [`Parser.withProps`](#lezer.Parser.withProps) to compute prop
/// values for each node type in the group. Takes a function that
/// returns undefined if the node type doesn't get this prop, or the
/// prop's value if it does.
NodeProp.prototype.add = function (f) { return new NodePropSource(this, f); };
/// values for each node type in the group. Takes a [match
/// object](#tree.NodeType.match) or function that returns undefined
/// if the node type doesn't get this prop, and the prop's value if
/// it does.
NodeProp.prototype.add = function (match) {
return new NodePropSource(this, typeof match == "function" ? match : NodeType.match(match));
};
/// The special node type that the parser uses to represent parse

@@ -75,0 +78,0 @@ /// errors has this flag set. (You shouldn't use it for custom nodes

{
"name": "lezer-tree",
"version": "0.5.0",
"version": "0.5.1",
"description": "Syntax tree data structure for the lezer parser",

@@ -5,0 +5,0 @@ "main": "dist/tree.js",

@@ -104,6 +104,9 @@ /// The default maximum length of a `TreeBuffer` node.

/// [`Parser.withProps`](#lezer.Parser.withProps) to compute prop
/// values for each node type in the group. Takes a function that
/// returns undefined if the node type doesn't get this prop, or the
/// prop's value if it does.
add(f: (type: NodeType) => T | undefined): NodePropSource { return new NodePropSource(this, f) }
/// values for each node type in the group. Takes a [match
/// object](#tree.NodeType.match) or function that returns undefined
/// if the node type doesn't get this prop, and the prop's value if
/// it does.
add(match: {[selector: string]: T} | ((type: NodeType) => T | undefined)): NodePropSource {
return new NodePropSource(this, typeof match == "function" ? match : NodeType.match(match))
}

@@ -110,0 +113,0 @@ /// The special node type that the parser uses to represent parse

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