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

Driver returns twice every inline comment #167

Closed

Description

@dpordomingo

When an inline comment is parsed, it is returned a structure that is different compared to other comments or compared to other drivers:
It is returned a <SameLineNoopscontaining roleComment> having position and containing a <NoopSameLine roleComment> without position.

The comment token itself contains a leading # character what does not happen for regular python comments.

a = Animal() # line comentary

image

addendum:
This issue might be related to these similar ones in other languages drivers:
bblfsh/javascript-driver#36 bblfsh/go-driver#28 bblfsh/java-driver#86

Activity

  1. juanjux commented on Sep 19, 2018

    @juanjux
    Contributor

    For what I'm seeing, the dashboard is not using Semantic UAST so it's normal that the structure is different among languages.

  2. dpordomingo commented on Sep 19, 2018

    @dpordomingo
    MemberAuthor

    The issue is not (only) about the dashboard but about the response I get from bblfsh.

    I found the unexpected behavior with lookout using the typos-checker analyzer when reviewing this comment, wrongly placed in a wrong line (because the comment node seems to have no position as it also happened in the dashboard).

    The bblfsh I'm runing to get that behaviour is:

    {
      server: {
        version: 'bblfsh/bblfshd:v2.5.0'
      },
      drivers: {
        'python': {
          image: 'docker://bblfsh/python-driver:latest'
          version: 'v2.3.0'
          native: 'python:3.6-alpine'
        }
      },
    }

    Should I configure my env in a different way to use bblfsh with Semantic UAST?

  3. self-assigned this
    on Sep 21, 2018
  4. juanjux commented on Jan 31, 2019

    @juanjux
    Contributor

    I was testing this, and could not reproduce with the latest versions - all kinds of comments only appear once. BUT I found another problem: some comments doesn't appear in the semantic output. I'm investigating that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions