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

lezer

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lezer - npm Package Compare versions

Comparing version 0.10.3 to 0.10.4

6

CHANGELOG.md

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

## 0.10.4 (2020-09-15)
### New features
Parser objects now have a `withTokenizer` method that can be used to replace external tokenizers.
## 0.10.3 (2020-09-10)

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

@@ -1359,2 +1359,7 @@ import { Tree, NodeProp, NodeGroup, NodeType, DefaultBufferLength, TreeBuffer } from 'lezer-tree';

};
/// Replace the given external tokenizer with another one, returning
/// a new parser object.
Parser.prototype.withTokenizer = function (from, to) {
return this.copy({ tokenizers: this.tokenizers.map(function (t) { return t == from ? to : t; }) });
};
Parser.prototype.copy = function (props) {

@@ -1361,0 +1366,0 @@ // Hideous reflection-based kludge to make it easy to create a

3

dist/parse.d.ts
import { Stack } from "./stack";
import { InputStream, Token, Tokenizer } from "./token";
import { InputStream, Token, Tokenizer, ExternalTokenizer } from "./token";
import { Tree, TreeBuffer, NodeGroup, NodeType, NodePropSource } from "lezer-tree";

@@ -86,2 +86,3 @@ export declare type NestedGrammar = null | Parser | ((input: InputStream, stack: Stack) => NestedGrammarSpec);

withProps(...props: NodePropSource[]): Parser;
withTokenizer(from: ExternalTokenizer, to: ExternalTokenizer): Parser;
private copy;

@@ -88,0 +89,0 @@ getName(term: number): string;

{
"name": "lezer",
"version": "0.10.3",
"version": "0.10.4",
"description": "Incremental parser",

@@ -5,0 +5,0 @@ "main": "dist/index.cjs",

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