Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Missing token for StringLiteralTypeAnnotation #66

Open
zurk opened this issue Mar 8, 2019 · 3 comments
Open

Missing token for StringLiteralTypeAnnotation #66

zurk opened this issue Mar 8, 2019 · 3 comments
Labels
Milestone

Comments

@zurk
Copy link

zurk commented Mar 8, 2019

how to reproduce:

wget https://raw.githubusercontent.com/reduxjs/redux/6949ba0ce1d25aca9fa40d250d81c7e09beff30f/examples/todos-flow/src/types/todos.js
docker run -d --rm --name style_analyzer_bblfshd_new --privileged -p 9432:9432 bblfsh/bblfshd\:v2.11.0 --log-level DEBUG
docker exec style_analyzer_bblfshd_new bblfshctl driver install javascript docker://bblfsh/javascript-driver:v2.6.0
docker cp todos.js style_analyzer_bblfshd_new:todos.js
docker exec -it style_analyzer_bblfshd_new bblfshctl parse todos.js | grep -A 16 StringLiteralTypeAnnotation

output:

.  .  .  .  .  .  .  .  .  .  .  .  .  .  1: StringLiteralTypeAnnotation {
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Roles: Declaration,Type,String,Literal
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  StartPosition: {
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Offset: 256
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Line: 20
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Col: 13
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  }
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  EndPosition: {
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Offset: 266
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Line: 20
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Col: 23
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  }
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Properties: {
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  internalRole: value
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  value: ADD_TODO
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  }
.  .  .  .  .  .  .  .  .  .  .  .  .  .  }
--
  .  .  .  .  .  .  .  .  .  .  .  .  .  .  1: StringLiteralTypeAnnotation {
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Roles: Declaration,Type,String,Literal
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  StartPosition: {
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Offset: 303
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Line: 21
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Col: 13
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  }
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  EndPosition: {
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Offset: 316
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Line: 21
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Col: 26
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  }
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Properties: {
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  internalRole: value
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  value: TOGGLE_TODO
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  }
.  .  .  .  .  .  .  .  .  .  .  .  .  .  }

It has value in its properties but no token.

@creachadair
Copy link
Contributor

Is this a regression or a case where the token was never present (and still isn't)?

@dennwc dennwc added the bug label Mar 8, 2019
@zurk
Copy link
Author

zurk commented Mar 8, 2019

It is a regression. It was present in v1.2.0

@bzz bzz removed their assignment Mar 11, 2019
@bzz bzz changed the title [bug] no token for StringLiteralTypeAnnotation for v2.6.0 driver Missing token for StringLiteralTypeAnnotation Mar 11, 2019
@bzz
Copy link
Contributor

bzz commented Mar 11, 2019

Thank you for a very nice report @zurk !

It could be either this, or part of the #63 - will take a look as soon asap, but after initial scope of 2.7.0 milestone

@bzz bzz added this to the v2.7.1 milestone Mar 12, 2019
@bzz bzz modified the milestones: v2.7.3, v2.7.x Apr 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants