Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3501

Forward slash in comment causes compiler error

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.10.0
    • Component/s: Compiler (General)
    • Labels:
      None

      Description

      This comment in a .thrift file will cause a parse error:

      /**
       * /
       */
      

      For example:

      $ thrift -version                 
      Thrift version 0.9.3
      $ cat example.thrift              
      namespace java com.example
      
      /**
       * /
       */
      struct Foo {}
      $ thrift --gen java example.thrift
      [ERROR:/Users/ryangreenberg/workspace/source/example.thrift:3] (last token was '/')
      Unexpected token in input: "/"
      

      This bug was encountered because of a reference to an absolute file path in a docblock comment (e.g. * /var/log/…)

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              jensg Jens Geyer
              Reporter:
              ryangreenberg Ryan Greenberg

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment