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

@montajs/compiler

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@montajs/compiler - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

15

dist/parser/scan.js

@@ -106,2 +106,6 @@ "use strict";

}
if (next === `'` || next === `"`) {
currentSection.content += collectString(source, next);
continue;
}
currentSection.content += next;

@@ -111,2 +115,13 @@ }

}
function collectString(source, delimiter) {
let value = delimiter;
while (source.hasNext()) {
let next = source.next();
value += next;
if (next === delimiter && source.peekBack(2) !== '\\') {
return value;
}
}
throw new Error(`Unexpected end of file, expected: ${delimiter}`);
}
/**

@@ -113,0 +128,0 @@ * Gets the name of a block in plain text

11

dist/parser/tokenise.js

@@ -79,3 +79,3 @@ "use strict";

exports.tokenise = tokenise;
function getStringLiteral(source, quote) {
function getStringLiteral(source, delimiter) {
let { line, col } = source;

@@ -85,3 +85,8 @@ let value = '';

let next = source.next();
if (next === quote && source.peekBack() !== '\\') {
if (next === '\\' && source.peekMatch(delimiter)) {
value += delimiter;
source.skip();
continue;
}
if (next === delimiter) {
return {

@@ -96,3 +101,3 @@ type: "T_LIT" /* Literal */,

}
throw new Error(`Unexpected end of string, expected: ${quote}`);
throw new Error(`Unexpected end of string, expected: ${delimiter}`);
}

@@ -99,0 +104,0 @@ function getNumberLiteral(source, start) {

@@ -10,3 +10,3 @@ {

"bugs": "https://github.com/montajs/compiler/issues",
"version": "0.2.0",
"version": "0.2.1",
"main": "dist/index.js",

@@ -13,0 +13,0 @@ "files": [

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