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 1.3.1 to 1.3.2

.idea/misc.xml

2

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

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

var character = require('../util/character');
var JSXToken = require('./JSXToken');
var Lexer = require('./Lexer');
var EcmascriptLexer = require('./EcmascriptLexer');

@@ -45,7 +45,7 @@ var RegMatch = require('./match/RegMatch');

var JSXLexer = Lexer.extend(function(rule) {
Lexer.call(this, rule);
var JSXLexer = EcmascriptLexer.extend(function(rule) {
EcmascriptLexer.call(this, rule);
}).methods({
init: function() {
Lexer.prototype.init.call(this);
EcmascriptLexer.prototype.init.call(this);
this.html = false; //目前是否为解析html状态

@@ -232,2 +232,11 @@ this.state = false; //是否在<>中

}
//template特殊语法
else if(this.peek == character.GRAVE) {
this.dealGrave(temp, length);
this.isReg = EcmascriptLexer.NOT_REG;
}
//递归解析template中的expr时结束跳出
else if(this.inTemplate && this.peek == '}') {
return this;
}
//依次遍历匹配规则,命中则继续

@@ -264,3 +273,3 @@ else {

//支持perl正则需判断关键字、圆括号对除号语义的影响
if(perlReg && match.perlReg() != Lexer.IGNORE) {
if(perlReg && match.perlReg() != EcmascriptLexer.IGNORE) {
this.stateReg(match);

@@ -267,0 +276,0 @@ }

define(function(require, exports, module) {var character = require('../util/character');
var JSXToken = require('./JSXToken');
var Lexer = require('./Lexer');
var EcmascriptLexer = require('./EcmascriptLexer');

@@ -45,7 +45,7 @@ var RegMatch = require('./match/RegMatch');

var JSXLexer = Lexer.extend(function(rule) {
Lexer.call(this, rule);
var JSXLexer = EcmascriptLexer.extend(function(rule) {
EcmascriptLexer.call(this, rule);
}).methods({
init: function() {
Lexer.prototype.init.call(this);
EcmascriptLexer.prototype.init.call(this);
this.html = false; //目前是否为解析html状态

@@ -232,2 +232,11 @@ this.state = false; //是否在<>中

}
//template特殊语法
else if(this.peek == character.GRAVE) {
this.dealGrave(temp, length);
this.isReg = EcmascriptLexer.NOT_REG;
}
//递归解析template中的expr时结束跳出
else if(this.inTemplate && this.peek == '}') {
return this;
}
//依次遍历匹配规则,命中则继续

@@ -264,3 +273,3 @@ else {

//支持perl正则需判断关键字、圆括号对除号语义的影响
if(perlReg && match.perlReg() != Lexer.IGNORE) {
if(perlReg && match.perlReg() != EcmascriptLexer.IGNORE) {
this.stateReg(match);

@@ -267,0 +276,0 @@ }

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