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

antlr4

Package Overview
Dependencies
Maintainers
2
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

antlr4 - npm Package Compare versions

Comparing version 4.12.0-beta.4 to 4.12.0-beta.5

8

package.json
{
"name": "antlr4",
"version": "4.12.0-beta.4",
"version": "4.12.0-beta.5",
"type": "module",

@@ -23,5 +23,5 @@ "description": "JavaScript runtime for ANTLR4",

"@babel/core": "^7.19.1",
"@babel/eslint-parser": "^7.19.1",
"@babel/preset-env": "^7.19.4",
"@types/node": "^18.7.23",
"@babel/eslint-parser": "^7.19.1",
"babel-loader": "^8.2.5",

@@ -49,6 +49,4 @@ "compression-webpack-plugin": "^10.0.0",

"browser": {
"fs": false,
"net": false,
"module": false
"fs": false
}
}
export declare class CharStream {
index: number; // defined as property
size: number;// defined as property
constructor(data: string);
constructor(data: string, decodeToUnicodeCodePoints: boolean);
reset(): void;
seek(index: number): void;
consume(): void;
getText(start: number, stop: number): string;
LA(offset: number): number;
LT(offset: number): number;
mark(): number;
release(marker: number): void;
seek(index: number): void;
getText(start: number, stop: number): string;
toString(): string;
}

@@ -5,3 +5,3 @@ import {CharStream} from "./CharStream";

fileName: string;
index: number; // defined as property

@@ -8,0 +8,0 @@ constructor(fileName: string);

@@ -7,3 +7,8 @@ /* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.

import InputStream from './InputStream.js';
import fs from "fs";
const isNode =
typeof process !== "undefined" &&
process.versions != null &&
process.versions.node != null;
// use eval to fool webpack and mocha
const fs = isNode ? await eval("import('fs')") : null;

@@ -16,2 +21,4 @@ /**

constructor(fileName, decodeToUnicodeCodePoints) {
if(!isNode)
throw new Error("FileStream is only available when running in Node!");
const data = fs.readFileSync(fileName, "utf8");

@@ -18,0 +25,0 @@ super(data, decodeToUnicodeCodePoints);

export * from "./InputStream";
export * from "./FileStream";
export * from "./CharStream";
export * from "./CharStreams";
export * from "./TokenStream";

@@ -18,2 +17,2 @@ export * from "./BufferedTokenStream";

export * from './error';
export * from './utils';
export * from './utils';

@@ -40,3 +40,2 @@ /* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.

import ParseTreeListener from "./tree/ParseTreeListener.js";
import ParseTreeVisitor from "./tree/ParseTreeVisitor.js";
import ParseTreeWalker from "./tree/ParseTreeWalker.js";

@@ -57,3 +56,3 @@ import ErrorListener from "./error/ErrorListener.js"

RuleNode, TerminalNode, ParseTreeWalker, RuleContext, ParserRuleContext, Interval, IntervalSet,
PredictionMode, LL1Analyzer, ParseTreeListener, ParseTreeVisitor, ATN, ATNDeserializer, PredictionContextCache, LexerATNSimulator, ParserATNSimulator, DFA,
PredictionMode, LL1Analyzer, ParseTreeListener, ATN, ATNDeserializer, PredictionContextCache, LexerATNSimulator, ParserATNSimulator, DFA,
RecognitionException, NoViableAltException, FailedPredicateException, ErrorListener, DiagnosticErrorListener, BailErrorStrategy,

@@ -67,2 +66,2 @@ arrayToString

import CodePointAt from './polyfills/codepointat.js';
import FromCodePoint from './polyfills/fromcodepoint.js';
import FromCodePoint from './polyfills/fromcodepoint.js';

Sorry, the diff of this file is too big to display

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