[Issue 19910] New: ImportVisitor example fails to parse random files

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue May 28 18:06:53 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=19910

          Issue ID: 19910
           Summary: ImportVisitor example fails to parse random files
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: goalitium at dissues.mail.kapsi.fi

The Import Visitor example (from here:
https://github.com/dlang/dmd/blob/master/src/examples/impvisitor.d ) with some
slight modifications (here:
https://gist.github.com/GoaLitiuM/841be5bf808a9b20f4b39ddcdf1edf70 )...

... Seems to fail parsing some files and usually print weird errors like these:
package.d(8): Error: Invalid trailing code unit
package.d(8): Error: Outside Unicode code space
package.d(8): Error: char 0x009b not allowed in identifier
package.d(8): Error: Outside Unicode code space
package.d(8): Error: character 0x9b is not a valid token
package.d(8): Error: character 0x02 is not a valid token
package.d(8): Error: no identifier for declarator `type`

Enabling garbage collector seems to cause different files to pass and other
files to fail instead, usually followed by a crash. I was also suggested to try
a slightly altered version of the example with the proper DMD initialization
and deinitialization, but it had no effect on this issue.

--


More information about the Digitalmars-d-bugs mailing list