cnpack / cnwizards

CnPack IDE Wizards
http://www.cnpack.org
577 stars 140 forks source link

Error using Code Formatter on Delphi XE3 #13

Open thecocce opened 9 years ago

thecocce commented 9 years ago

When i use Code Formatter on this unit i receive an error:

Format Error (15,1):Symbol Excepted.
Current: "Interface"

i tried the integrated CF inside XE3 and it works properly.

// VCL uses section
{$IFNDEF FMX}
unit Unit1;
{$INCLUDE vcl.inc}

interface

uses
  adodb, activex, Classes, db, SysUtils, Math;

// FMX uses
{$ELSE FMX}
{$INCLUDE fmx.inc}

interface

uses
  System.Classes, Data.db, System.SysUtils, System.Math, System.zlib;
{$ENDIF FMX}

type
  TMyClass = class

  end;

implementation

end.
shanzhashu commented 9 years ago

We can't process complex compiler directives and treat them as comments, so there will be 2 interface keywords in the unit above and error occurs.