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

cashc

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cashc - npm Package Compare versions

Comparing version 0.5.6 to 0.5.7

dist/main/ast/ThrowingErrorListener.d.ts

2

dist/main/Errors.d.ts

@@ -8,2 +8,4 @@ import { IdentifierNode, FunctionDefinitionNode, VariableDefinitionNode, ParameterNode, Node, FunctionCallNode, BinaryOpNode, UnaryOpNode, TimeOpNode, CastNode, AssignNode, BranchNode, ArrayNode, TupleIndexOpNode, RequireNode, InstantiationNode } from './ast/AST';

}
export declare class ParseError extends Error {
}
export declare class UndefinedReferenceError extends CashScriptError {

@@ -10,0 +12,0 @@ node: IdentifierNode;

@@ -16,2 +16,5 @@ "use strict";

exports.CashScriptError = CashScriptError;
class ParseError extends Error {
}
exports.ParseError = ParseError;
class UndefinedReferenceError extends CashScriptError {

@@ -18,0 +21,0 @@ constructor(node) {

2

dist/main/index.d.ts

@@ -6,2 +6,2 @@ export * from './Errors';

export { Data, Artifacts, CashCompiler, } from './util';
export declare const version = "0.5.6";
export declare const version = "0.5.7";

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

exports.CashCompiler = util_1.CashCompiler;
exports.version = '0.5.6';
exports.version = '0.5.7';
//# sourceMappingURL=index.js.map

@@ -20,2 +20,3 @@ "use strict";

const VerifyCovenantTraversal_1 = __importDefault(require("./semantic/VerifyCovenantTraversal"));
const ThrowingErrorListener_1 = __importDefault(require("./ast/ThrowingErrorListener"));
exports.Data = {

@@ -135,9 +136,12 @@ encodeBool(bool) {

function parseCode(code) {
// Lexing
// Lexing (throwing on errors)
const inputStream = new antlr4ts_1.ANTLRInputStream(code);
const lexer = new CashScriptLexer_1.CashScriptLexer(inputStream);
lexer.removeErrorListeners();
lexer.addErrorListener(ThrowingErrorListener_1.default.INSTANCE);
const tokenStream = new antlr4ts_1.CommonTokenStream(lexer);
// Parsing using a strict bail-on-error strategy without any error recovery
// Parsing (throwing on errors)
const parser = new CashScriptParser_1.CashScriptParser(tokenStream);
parser.errorHandler = new antlr4ts_1.BailErrorStrategy();
parser.removeErrorListeners();
parser.addErrorListener(ThrowingErrorListener_1.default.INSTANCE);
const parseTree = parser.sourceFile();

@@ -144,0 +148,0 @@ // AST building

@@ -8,2 +8,4 @@ import { IdentifierNode, FunctionDefinitionNode, VariableDefinitionNode, ParameterNode, Node, FunctionCallNode, BinaryOpNode, UnaryOpNode, TimeOpNode, CastNode, AssignNode, BranchNode, ArrayNode, TupleIndexOpNode, RequireNode, InstantiationNode } from './ast/AST';

}
export declare class ParseError extends Error {
}
export declare class UndefinedReferenceError extends CashScriptError {

@@ -10,0 +12,0 @@ node: IdentifierNode;

@@ -13,2 +13,4 @@ import { BinaryOpNode, UnaryOpNode, TimeOpNode, AssignNode, TupleIndexOpNode, RequireNode, } from './ast/AST';

}
export class ParseError extends Error {
}
export class UndefinedReferenceError extends CashScriptError {

@@ -15,0 +17,0 @@ constructor(node) {

@@ -6,2 +6,2 @@ export * from './Errors';

export { Data, Artifacts, CashCompiler, } from './util';
export declare const version = "0.5.6";
export declare const version = "0.5.7";

@@ -5,3 +5,3 @@ export * from './Errors';

export { Data, Artifacts, CashCompiler, } from './util';
export const version = '0.5.6';
export const version = '0.5.7';
//# sourceMappingURL=index.js.map
import { bigIntToScriptNumber, parseBytesAsScriptNumber, isScriptNumberError, encodeDataPush, parseBytecode, serializeAuthenticationInstructions, disassembleBytecodeBCH, hexToBin, utf8ToBin, binToUtf8, } from '@bitauth/libauth';
import { ANTLRInputStream, BailErrorStrategy, CommonTokenStream } from 'antlr4ts';
import { ANTLRInputStream, CommonTokenStream } from 'antlr4ts';
import fs from 'fs';

@@ -15,2 +15,3 @@ import { CashScriptLexer } from './grammar/CashScriptLexer';

import VerifyCovenantTraversal from './semantic/VerifyCovenantTraversal';
import ThrowingErrorListener from './ast/ThrowingErrorListener';
export const Data = {

@@ -130,9 +131,12 @@ encodeBool(bool) {

export function parseCode(code) {
// Lexing
// Lexing (throwing on errors)
const inputStream = new ANTLRInputStream(code);
const lexer = new CashScriptLexer(inputStream);
lexer.removeErrorListeners();
lexer.addErrorListener(ThrowingErrorListener.INSTANCE);
const tokenStream = new CommonTokenStream(lexer);
// Parsing using a strict bail-on-error strategy without any error recovery
// Parsing (throwing on errors)
const parser = new CashScriptParser(tokenStream);
parser.errorHandler = new BailErrorStrategy();
parser.removeErrorListeners();
parser.addErrorListener(ThrowingErrorListener.INSTANCE);
const parseTree = parser.sourceFile();

@@ -139,0 +143,0 @@ // AST building

{
"name": "cashc",
"version": "0.5.6",
"version": "0.5.7",
"description": "Compile Bitcoin Cash contracts to Bitcoin Cash Script or artifacts",

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

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