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.1.10 to 0.1.11

6

index.js

@@ -142,6 +142,2 @@ var Lexer = require('./src/lexer/Lexer');

}
};
var madge = require('madge');
var dependencyObject = madge('./web');
console.log(dependencyObject.tree);
};

2

package.json
{
"name": "homunculus",
"version": "0.1.10",
"version": "0.1.11",
"description": "A lexer&parser by Javascript",

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

@@ -1112,7 +1112,12 @@ var Class = require('../../util/Class');

switch(this.look.content()) {
case '++':
case '--':
node.add(
this.match(),
this.leftexpr()
);
break;
case 'delete':
case 'void':
case 'typeof':
case '++':
case '--':
case '+':

@@ -1136,6 +1141,6 @@ case '-':

if(this.look && ['++', '--'].indexOf(this.look.content()) > -1 && !this.hasMoveLine) {
node.add(leftexpr);
while(this.look && ['++', '--'].indexOf(this.look.content()) > -1) {
node.add(this.match(undefined, true));
}
node.add(
leftexpr,
this.match(undefined, true)
);
}

@@ -1142,0 +1147,0 @@ else {

@@ -788,7 +788,12 @@ var Class = require('../../util/Class');

switch(this.look.content()) {
case '++':
case '--':
node.add(
this.match(),
this.leftexpr()
);
break;
case 'delete':
case 'void':
case 'typeof':
case '++':
case '--':
case '+':

@@ -812,6 +817,6 @@ case '-':

if(this.look && ['++', '--'].indexOf(this.look.content()) > -1 && !this.hasMoveLine) {
node.add(leftexpr);
while(this.look && ['++', '--'].indexOf(this.look.content()) > -1) {
node.add(this.match(undefined, true));
}
node.add(
leftexpr,
this.match(undefined, true)
);
}

@@ -818,0 +823,0 @@ else {

@@ -351,3 +351,3 @@ var homunculus = require('../');

});
it('unaryexpr error', function() {
it('unaryexpr error 1', function() {
var parser = homunculus.getParser('js');

@@ -358,2 +358,19 @@ expect(function() {

});
it('unaryexpr error 2', function() {
var parser = homunculus.getParser('js');
expect(function() {
parser.parse('++ +a');
}).to.throwError();
});
it('postfixexpr', function() {
var parser = homunculus.getParser('js');
var node = parser.parse('a++');
expect(tree(node)).to.eql([JsNode.PROGRAM,[JsNode.EXPRSTMT,[JsNode.POSTFIXEXPR,[JsNode.PRMREXPR,["a"],"++"]]]]);
});
it('postfixexpr error', function() {
var parser = homunculus.getParser('js');
expect(function() {
parser.parse('a++ ++');
}).to.throwError();
});
it('mtplexpr 1', function() {

@@ -360,0 +377,0 @@ var parser = homunculus.getParser('js');

@@ -1113,7 +1113,12 @@ define(function(require, exports, module) {

switch(this.look.content()) {
case '++':
case '--':
node.add(
this.match(),
this.leftexpr()
);
break;
case 'delete':
case 'void':
case 'typeof':
case '++':
case '--':
case '+':

@@ -1120,0 +1125,0 @@ case '-':

@@ -789,7 +789,12 @@ define(function(require, exports, module) {

switch(this.look.content()) {
case '++':
case '--':
node.add(
this.match(),
this.leftexpr()
);
break;
case 'delete':
case 'void':
case 'typeof':
case '++':
case '--':
case '+':

@@ -796,0 +801,0 @@ case '-':

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