浏览代码

Merged revisions 2569-2570 via svnmerge from
http://[email protected]/svn/fpc/trunk

........
r2569 | jonas | 2006-02-14 17:40:52 +0100 (Tue, 14 Feb 2006) | 7 lines

- "property" is again only a keyword in objfpc and delphi mode
(otherwise this breaks code which uses that name for a parameter
or variabled) -- this disables the ability to use properties
in objects until support is added elsewhere in the compiler,
but change is needed since it breaks the compilation of the
universal headers.

........
r2570 | daniel | 2006-02-14 18:11:18 +0100 (Tue, 14 Feb 2006) | 3 lines

+ Add m_property mode switch to allow per mode recognition of
property.

........

git-svn-id: branches/fixes_2_0@2576 -

peter 19 年之前
父节点
当前提交
5c7bc7937b
共有 3 个文件被更改,包括 9 次插入5 次删除
  1. 6 3
      compiler/globals.pas
  2. 2 1
      compiler/globtype.pas
  3. 1 1
      compiler/tokens.pas

+ 6 - 3
compiler/globals.pas

@@ -54,13 +54,16 @@ interface
        delphimodeswitches : tmodeswitches=
          [m_delphi,m_all,m_class,m_objpas,m_result,m_string_pchar,
           m_pointer_2_procedure,m_autoderef,m_tp_procvar,m_initfinal,m_default_ansistring,
-          m_out,m_default_para,m_duplicate_names,m_hintdirective,m_add_pointer];
+          m_out,m_default_para,m_duplicate_names,m_hintdirective,m_add_pointer,
+          m_property];
        fpcmodeswitches    : tmodeswitches=
          [m_fpc,m_all,m_string_pchar,m_nested_comment,m_repeat_forward,
-          m_cvar_support,m_initfinal,m_add_pointer,m_hintdirective];
+          m_cvar_support,m_initfinal,m_add_pointer,m_hintdirective,
+          m_property];
        objfpcmodeswitches : tmodeswitches=
          [m_objfpc,m_fpc,m_all,m_class,m_objpas,m_result,m_string_pchar,m_nested_comment,
-          m_repeat_forward,m_cvar_support,m_initfinal,m_add_pointer,m_out,m_default_para,m_hintdirective];
+          m_repeat_forward,m_cvar_support,m_initfinal,m_add_pointer,m_out,m_default_para,m_hintdirective,
+          m_property];
        tpmodeswitches     : tmodeswitches=
          [m_tp7,m_all,m_tp_procvar,m_duplicate_names];
        gpcmodeswitches    : tmodeswitches=

+ 2 - 1
compiler/globtype.pas

@@ -155,7 +155,8 @@ than 255 characters. That's why using Ansi Strings}
          m_out,                 { support the calling convention OUT }
          m_default_para,        { support default parameters }
          m_hintdirective,       { support hint directives }
-         m_duplicate_names      { allow locals/paras to have duplicate names of globals }
+         m_duplicate_names,     { allow locals/paras to have duplicate names of globals }
+         m_property             { allow properties }
        );
        tmodeswitches = set of tmodeswitch;
 

+ 1 - 1
compiler/tokens.pas

@@ -439,7 +439,7 @@ const
       (str:'OVERLOAD'      ;special:false;keyword:m_none;op:NOTOKEN),
       (str:'OVERRIDE'      ;special:false;keyword:m_none;op:NOTOKEN),
       (str:'PLATFORM'      ;special:false;keyword:m_none;op:NOTOKEN),
-      (str:'PROPERTY'      ;special:false;keyword:m_all;op:NOTOKEN),
+      (str:'PROPERTY'      ;special:false;keyword:m_property;op:NOTOKEN),
       (str:'REGISTER'      ;special:false;keyword:m_none;op:NOTOKEN),
       (str:'RESIDENT'      ;special:false;keyword:m_none;op:NOTOKEN),
       (str:'SAFECALL'      ;special:false;keyword:m_none;op:NOTOKEN),