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

jeefo_tokenizer

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

jeefo_tokenizer - npm Package Compare versions

Comparing version 0.0.34 to 0.0.35

20

index.js
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
* File Name : index.js
* Created at : 2017-04-12
* Updated at : 2019-01-29
* Updated at : 2019-03-05
* Author : jeefo

@@ -30,18 +30,2 @@ * Purpose :

clone () {
const clone = new JeefoTokenizer();
clone.token_definitions = this.token_definitions.map(token_definition => {
return new TokenDefinition({
is : token_definition.is,
initialize : token_definition.initialize,
prototype : token_definition.Token.prototype
});
});
clone.cursor_positions_stack = this.cursor_positions_stack.map(cursor_position => Object.assign({}, cursor_position));
return clone;
}
get_next_token () {

@@ -67,3 +51,3 @@ const current_character = this.streamer.get_next_character(true);

this.token_definitions.push(new TokenDefinition(token_definition));
this.token_definitions.sort((a, b) => a.Token.prototype.precedence - b.Token.prototype.precedence);
this.token_definitions.sort((a, b) => a.Token.prototype.priority - b.Token.prototype.priority);

@@ -70,0 +54,0 @@ return this;

2

package.json
{
"name": "jeefo_tokenizer",
"version": "0.0.34",
"version": "0.0.35",
"homepage": "https://github.com/je3f0o/jeefo_tokenizer",

@@ -5,0 +5,0 @@ "copyright": "2017",

/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
* File Name : token_definition.js
* Created at : 2017-08-10
* Updated at : 2019-01-29
* Updated at : 2019-03-05
* Author : jeefo

@@ -22,7 +22,7 @@ * Purpose :

}
if (typeof token_definition.type !== "string") {
throw new Error("Invalid argument: token_definition.type");
if (typeof token_definition.id !== "string") {
throw new Error("Invalid argument: token_definition.id");
}
if (typeof token_definition.precedence !== "number") {
throw new Error("Invalid argument: token_definition.precedence");
if (typeof token_definition.priority !== "number") {
throw new Error("Invalid argument: token_definition.priority");
}

@@ -37,4 +37,4 @@ if (typeof token_definition.is !== "function") {

this.Token = class Token {};
this.Token.prototype.type = token_definition.type;
this.Token.prototype.precedence = token_definition.precedence;
this.Token.prototype.id = token_definition.id;
this.Token.prototype.priority = token_definition.priority;

@@ -41,0 +41,0 @@ this.is = token_definition.is;

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