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.5 to 4.12.0-beta.6

src/antlr4/CharStreams.d.ts

2

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

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

export declare class CharStream {
index: number; // defined as property
size: number;// defined as property
constructor(data: string);
constructor(data: string, decodeToUnicodeCodePoints: boolean);
reset(): void;
consume(): void;
LA(offset: number): number;
LT(offset: number): number;
mark(): number;
release(marker: number): void;
seek(index: number): void;
consume(): void;
getText(start: number, stop: number): string;
LA(offset: number): number;
toString(): 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;

@@ -10,0 +15,0 @@ /**

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

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

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

export * from "./InputStream";
export * from "./FileStream";
export * from "./CharStream";
export * from "./CharStreams";
export * from "./TokenStream";
export * from "./BufferedTokenStream";
export * from "./CommonTokenStream";
export * from "./Recognizer";
export * from "./Lexer";

@@ -17,2 +19,2 @@ export * from "./Parser";

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

@@ -40,2 +40,3 @@ /* 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";

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

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

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

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

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

* {@link ANTLRErrorStrategy//recoverInline} is called on the current error
* strategy to attempt recovery. If {@link //getBuildParseTree} is
* strategy to attempt recovery. If {@link //buildParseTree} is
* {@code true} and the token index of the symbol returned by

@@ -121,3 +121,3 @@ * {@link ANTLRErrorStrategy//recoverInline} is -1, the symbol is added to

* {@link ANTLRErrorStrategy//recoverInline} is called on the current error
* strategy to attempt recovery. If {@link //getBuildParseTree} is
* strategy to attempt recovery. If {@link //buildParseTree} is
* {@code true} and the token index of the symbol returned by

@@ -139,3 +139,3 @@ * {@link ANTLRErrorStrategy//recoverInline} is -1, the symbol is added to

t = this._errHandler.recoverInline(this);
if (this._buildParseTrees && t.tokenIndex === -1) {
if (this.buildParseTrees && t.tokenIndex === -1) {
// we must have conjured up a new token during single token

@@ -142,0 +142,0 @@ // insertion

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

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