question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Public members missing from MismatchedTokenException type declaration

See original GitHub issue

It looks like MismatchedTokenException and the other parser exception types are missing a few members (and don’t implement IRecognitionException).

i.e. this

export declare class MismatchedTokenException extends Error {
  constructor(message: string, token: IToken, previousToken: IToken)
}

should probably be this

export declare class MismatchedTokenException extends Error implements IRecognitionException {
  token: IToken
  resyncedTokens: IToken[]
  context: IRecognizerContext
  previousToken: IToken

  constructor(message: string, token: IToken, previousToken: IToken)
}

The only possible showstopper on this seems to be converting the implementation’s exception constructors from functions to classes to get the typing test passing. Which shouldn’t be an issue if we don’t support IE10. Was IE11 the lowest supported browser?

If so I can look at putting a PR together to fix this.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mbett7commented, Jan 5, 2021

Great, I’ll put a PR together sometime over the next couple of days.

0reactions
bd82commented, Feb 23, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

Java 8 Grammar: annotations on varargs parameters #3238
Taken from PR #3230 when working on Issue #3033 from a run on OpenJDK 8/9. $ cat TestClass.java import java.lang.annotation.
Read more >
CompilationEventCode Enumeration - NI - National Instruments
Specifies the code for an event that occurs during compilation of a real-time sequence or stimulus profile. Namespace: NationalInstruments.VeriStand.
Read more >
ANTLR White Space Question (and not the typical one)
If I type anything in the ANTLRWorks Interpreter box, and if I don't select line endings Mac (CR), I get issues about insufficient...
Read more >
The Design and Implementation of Venbrace, a Text ...
Blocks programming environments (BPEs) lower barriers to programming using visual code fragments that prevent syntactic and static semantic ...
Read more >
Coding - checkstyle
class Test { public boolean equals(Test i) { // violation return false; } ... First the public class variables, then protected, then package ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found