@syntest/ast-visitor-javascript
Advanced tools
Comparing version 0.2.0-beta.3 to 0.2.0-beta.4
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.AbstractSyntaxTreeVisitor = exports.MemberSeparator = void 0; | ||
const diagnostics_1 = require("@syntest/diagnostics"); | ||
const logging_1 = require("@syntest/logging"); | ||
@@ -72,3 +73,3 @@ const globalVariables_1 = require("./globalVariables"); | ||
if (loc === undefined) { | ||
throw new Error(`Node ${path.type} in file '${this._filePath}' does not have a location`); | ||
throw new diagnostics_1.ImplementationError(`Node ${path.type} in file '${this._filePath}' does not have a location`); | ||
} | ||
@@ -100,3 +101,3 @@ const startLine = loc.start.line; | ||
else { | ||
throw new Error("Cannot get binding for labeled statement"); | ||
throw new diagnostics_1.ImplementationError("Cannot get binding for labeled statement"); | ||
} | ||
@@ -175,3 +176,3 @@ } | ||
else { | ||
throw new Error(`Cannot find binding for ${path.node.name} at ${this._getNodeId(path)}`); | ||
throw new diagnostics_1.ImplementationError(`Cannot find binding for ${path.node.name} at ${this._getNodeId(path)}`); | ||
} | ||
@@ -191,3 +192,3 @@ } | ||
else { | ||
throw new Error(`ThisExpression without parent function found at ${this._getNodeId(path)}`); | ||
throw new diagnostics_1.ImplementationError(`ThisExpression without parent function found at ${this._getNodeId(path)}`); | ||
} | ||
@@ -204,3 +205,3 @@ } | ||
else { | ||
throw new Error(`ThisExpression without parent function found at ${this._getNodeId(path)}`); | ||
throw new diagnostics_1.ImplementationError(`ThisExpression without parent function found at ${this._getNodeId(path)}`); | ||
} | ||
@@ -213,3 +214,3 @@ } | ||
// impossible? | ||
throw new Error(`ThisExpression without parent class found at ${this._getNodeId(path)}`); | ||
throw new diagnostics_1.ImplementationError(`ThisExpression without parent class found at ${this._getNodeId(path)}`); | ||
} | ||
@@ -222,3 +223,3 @@ return classParent; | ||
// impossible? | ||
throw new Error(`ThisExpression without parent object found at ${this._getNodeId(path)}`); | ||
throw new diagnostics_1.ImplementationError(`ThisExpression without parent object found at ${this._getNodeId(path)}`); | ||
} | ||
@@ -230,7 +231,7 @@ return objectParent; | ||
} | ||
throw new Error(`ThisExpression without parent function found at ${this._getNodeId(path)}`); | ||
throw new diagnostics_1.ImplementationError(`ThisExpression without parent function found at ${this._getNodeId(path)}`); | ||
} | ||
_getCurrentThisScopeId() { | ||
if (this._thisScopeStack.length === 0) { | ||
throw new Error("Invalid scope stack!"); | ||
throw new diagnostics_1.ImplementationError("Invalid scope stack!"); | ||
} | ||
@@ -237,0 +238,0 @@ return this._thisScopeStack[this._thisScopeStack.length - 1]; |
{ | ||
"name": "@syntest/ast-visitor-javascript", | ||
"version": "0.2.0-beta.3", | ||
"version": "0.2.0-beta.4", | ||
"description": "SynTest AST JavaScript is a library for visiting Abstract Syntax Trees for the JavaScript language", | ||
@@ -53,3 +53,4 @@ "keywords": [ | ||
"@babel/traverse": "7.20.12", | ||
"@syntest/logging": "^0.1.1", | ||
"@syntest/diagnostics": "^0.1.0-beta.0", | ||
"@syntest/logging": "^0.2.0-beta.2", | ||
"globals": "^13.20.0" | ||
@@ -66,3 +67,3 @@ }, | ||
}, | ||
"gitHead": "e75194cbb88e7ce9fcdb0f9083cc66befc265190" | ||
"gitHead": "ce22f962248ab40d23755169870f9416413e3921" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42475
415
5
+ Added@syntest/diagnostics@0.1.0-beta.1(transitive)
+ Added@syntest/logging@0.2.0-beta.5(transitive)
+ Addedwinston@3.13.0(transitive)
- Removed@colors/colors@1.5.0(transitive)
- Removed@syntest/logging@0.1.1(transitive)
- Removedwinston@3.8.2(transitive)