Skip to content

Parse error on a namespace in mozcpp with tree-sitter-mozcpp v0.19 #579

Description

@Luni-4
namespace mozilla::dom::quota {} // namespace mozilla::dom::quota

AST

`- {translation_unit:228} from (1, 1) to (2, 1)
   |- {ERROR:65535} from (1, 1) to (1, 33) : namespace mozilla::dom::quota {}
   |  |- {namespace:145} from (1, 1) to (1, 10) : namespace
   |  |- {identifier:1} from (1, 11) to (1, 18) : mozilla
   |  `- {compound_literal_expression:325} from (1, 18) to (1, 33) : ::dom::quota {}
   |     |- {scoped_type_identifier:401} from (1, 18) to (1, 30) : ::dom::quota
   |     |  |- {scoped_namespace_identifier:402} from (1, 18) to (1, 23) : ::dom
   |     |  |  |- {:::139} from (1, 18) to (1, 20) : ::
   |     |  |  `- {namespace_identifier:439} from (1, 20) to (1, 23) : dom
   |     |  |- {:::139} from (1, 23) to (1, 25) : ::
   |     |  `- {type_identifier:441} from (1, 25) to (1, 30) : quota
   |     `- {initializer_list:327} from (1, 31) to (1, 33) : {}
   |        |- {{:56} from (1, 31) to (1, 32) : {
   |        `- {}:57} from (1, 32) to (1, 33) : }
   `- {comment:126} from (1, 35) to (1, 67) : // namespace mozilla::dom::quota

Activity

  1. changed the title [-]Parse errors with tree-sitter-mozcpp grammar for tree-sitter-mozcpp v0.19[/-] [+]Parse errors with mozcpp grammar for tree-sitter-mozcpp v0.19[/+] on Mar 25, 2021
  2. changed the title [-]Parse errors with mozcpp grammar for tree-sitter-mozcpp v0.19[/-] [+]Parse errors on a namespace in mozcpp with tree-sitter-mozcpp v0.19[/+] on Mar 26, 2021
  3. changed the title [-]Parse errors on a namespace in mozcpp with tree-sitter-mozcpp v0.19[/-] [+]Parse error on a namespace in mozcpp with tree-sitter-mozcpp v0.19[/+] on Mar 26, 2021
  4. marco-c commented on Mar 29, 2021

    @marco-c
    Collaborator

    Is this an error with mozcpp only or also with the normal tree-sitter-cpp?

  5. marco-c commented on Sep 16, 2021

    @marco-c
    Collaborator

    Is this an error with mozcpp only or also with the normal tree-sitter-cpp?

    @Luni-4 ?

  6. Luni-4 commented on Sep 18, 2021

    @Luni-4
    CollaboratorAuthor

    tree-sitter-cpp v0.20 fixes the problem:

     (translation_unit [0, 0] - [1, 0]
      (namespace_definition [0, 0] - [0, 32]
        name: (namespace_definition_name [0, 10] - [0, 29]
          (namespace_definition_name [0, 10] - [0, 22]
            (identifier [0, 10] - [0, 17])
            (identifier [0, 19] - [0, 22]))
          (identifier [0, 24] - [0, 29]))
        body: (declaration_list [0, 30] - [0, 32])))
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions