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

homunculus

Package Overview
Dependencies
Maintainers
2
Versions
164
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

homunculus - npm Package Compare versions

Comparing version 0.7.5 to 0.7.6

2

lib/unicode.js

@@ -58,3 +58,3 @@ var fs = require('fs');

var 低位 = (编码 - 0x10000) % 0x400 + 0xDC00;
return 补前缀(高位) + 补前缀(低位);
return 补前缀(高位.toString(16)) + 补前缀(低位.toString(16));
}

@@ -61,0 +61,0 @@ else {

{
"name": "homunculus",
"version": "0.7.5",
"version": "0.7.6",
"description": "A lexer&parser by Javascript",

@@ -5,0 +5,0 @@ "maintainers": [

@@ -635,3 +635,3 @@ var IParser = require('../Parser');

var next = this.tokens[j];
if(!S[token.type()]) {
if(!S[next.type()]) {
if(['in', 'of'].indexOf(next.content()) > -1) {

@@ -687,14 +687,53 @@ node.add(

else if(['let', 'const'].indexOf(this.look.content()) > -1) {
node.add(
this.match(),
this.forbind()
);
if(!this.look || ['in', 'of'].indexOf(this.look.content()) == -1) {
this.error();
outer:
for(var i = this.index; i < this.length; i++) {
var token = this.tokens[i];
if(!S[token.type()]) {
//直接指向LexicalDeclaration
if(['{', '['].indexOf(token.content()) > -1) {
node.add(this.lexdecl(yYield));
if(this.look && this.look.content() != ';') {
node.add(this.expr());
}
node.add(this.match(';'));
if(this.look && this.look.content() != ')') {
node.add(this.expr());
}
break;
}
//仅一个id之后跟着of或in也是LexicalDeclaration
else if(token.type() == Token.ID) {
for(var j = i + 1; j < this.length; j++) {
var next = this.tokens[j];
if(!S[next.type()]) {
if(['in', 'of'].indexOf(next.content()) > -1) {
node.add(
this.match(),
this.forbind()
);
var isOf = next.content() == 'of';
node.add(
this.match(),
isOf ? this.assignexpr() : this.expr()
);
}
else {
node.add(this.lexdecl(yYield));
if(this.look && this.look.content() != ';') {
node.add(this.expr());
}
node.add(this.match(';'));
if(this.look && this.look.content() != ')') {
node.add(this.expr());
}
}
break outer;
}
}
}
else {
this.error();
}
}
}
var isOf = this.look.content() == 'of';
node.add(
this.match(),
isOf ? this.assignexpr() : this.expr()
);
}

@@ -701,0 +740,0 @@ else {

@@ -635,3 +635,3 @@ define(function(require, exports, module) {var IParser = require('../Parser');

var next = this.tokens[j];
if(!S[token.type()]) {
if(!S[next.type()]) {
if(['in', 'of'].indexOf(next.content()) > -1) {

@@ -687,14 +687,53 @@ node.add(

else if(['let', 'const'].indexOf(this.look.content()) > -1) {
node.add(
this.match(),
this.forbind()
);
if(!this.look || ['in', 'of'].indexOf(this.look.content()) == -1) {
this.error();
outer:
for(var i = this.index; i < this.length; i++) {
var token = this.tokens[i];
if(!S[token.type()]) {
//直接指向LexicalDeclaration
if(['{', '['].indexOf(token.content()) > -1) {
node.add(this.lexdecl(yYield));
if(this.look && this.look.content() != ';') {
node.add(this.expr());
}
node.add(this.match(';'));
if(this.look && this.look.content() != ')') {
node.add(this.expr());
}
break;
}
//仅一个id之后跟着of或in也是LexicalDeclaration
else if(token.type() == Token.ID) {
for(var j = i + 1; j < this.length; j++) {
var next = this.tokens[j];
if(!S[next.type()]) {
if(['in', 'of'].indexOf(next.content()) > -1) {
node.add(
this.match(),
this.forbind()
);
var isOf = next.content() == 'of';
node.add(
this.match(),
isOf ? this.assignexpr() : this.expr()
);
}
else {
node.add(this.lexdecl(yYield));
if(this.look && this.look.content() != ';') {
node.add(this.expr());
}
node.add(this.match(';'));
if(this.look && this.look.content() != ')') {
node.add(this.expr());
}
}
break outer;
}
}
}
else {
this.error();
}
}
}
var isOf = this.look.content() == 'of';
node.add(
this.match(),
isOf ? this.assignexpr() : this.expr()
);
}

@@ -701,0 +740,0 @@ else {

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