Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no InvalidNumberError in TokenizerErrors #14

Closed
JothamWong opened this issue Mar 11, 2024 · 1 comment · Fixed by #15
Closed

There is no InvalidNumberError in TokenizerErrors #14

JothamWong opened this issue Mar 11, 2024 · 1 comment · Fixed by #15

Comments

@JothamWong
Copy link

JothamWong commented Mar 11, 2024

This is a current bug in the implementation where in your baseNumber implementation, you attempt to call a method that does not exist in the namespace.

This is easily reproducible but just calling yarn build will result in the following error

$ node ./scripts/updateAutocompleteDocs.js
src/py-slang/src/tokenizer.ts:228:47 - error TS2339: Property 'InvalidNumberError' does not exist on type 'typeof TokenizerErrors'.

228                     throw new TokenizerErrors.InvalidNumberError(this.line, this.col, this.source, this.start, this.current);
                                                  ~~~~~~~~~~~~~~~~~~

src/py-slang/src/tokenizer.ts:237:47 - error TS2339: Property 'InvalidNumberError' does not exist on type 'typeof TokenizerErrors'.

237                     throw new TokenizerErrors.InvalidNumberError(this.line, this.col, this.source, this.start, this.current);
                                                  ~~~~~~~~~~~~~~~~~~

src/py-slang/src/tokenizer.ts:246:47 - error TS2339: Property 'InvalidNumberError' does not exist on type 'typeof TokenizerErrors'.

246                     throw new TokenizerErrors.InvalidNumberError(this.line, this.col, this.source, this.start, this.current);
                                                  ~~~~~~~~~~~~~~~~~~

src/py-slang/src/tokenizer.ts:268:51 - error TS2339: Property 'InvalidNumberError' does not exist on type 'typeof TokenizerErrors'.

268                         throw new TokenizerErrors.InvalidNumberError(this.line, this.col, this.source, this.start, this.current);
                                                      ~~~~~~~~~~~~~~~~~~

src/py-slang/src/tokenizer.ts:296:43 - error TS2339: Property 'InvalidNumberError' does not exist on type 'typeof TokenizerErrors'.

296                 throw new TokenizerErrors.InvalidNumberError(this.line, this.col, this.source, this.start, this.current);
                                              ~~~~~~~~~~~~~~~~~~


Found 5 errors.
@Fidget-Spinner
Copy link
Contributor

Hmm this seems to be an actual bug.

@JJtan2002 could you please add the error to

? You can copy one of the other errors in that file already. I think it should be interesting. If you have midterms and are busy just ignore my message for now please. Thanks!

@JJtan2002 JJtan2002 linked a pull request Mar 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants