* whitespace fixes from Ryan

+ some comments from Ryan

git-svn-id: trunk@16919 -
This commit is contained in:
Jonas Maebe 2011-02-15 20:53:03 +00:00
parent 4d13235ea0
commit c1385b6446
2 changed files with 14 additions and 12 deletions

View File

@ -1539,6 +1539,7 @@ class ObjectivePParser extends ObjectivePParserBase {
$this->PrintOutput(0, "{\$endif}"); $this->PrintOutput(0, "{\$endif}");
} }
// print class/protocol forward declarations
if (($header["classes"]) || ($header["protocols"])) { if (($header["classes"]) || ($header["protocols"])) {
$this->PrintOutput(0, ""); $this->PrintOutput(0, "");
$this->PrintOutput(0, "{\$ifdef FORWARD}"); $this->PrintOutput(0, "{\$ifdef FORWARD}");
@ -1561,6 +1562,7 @@ class ObjectivePParser extends ObjectivePParserBase {
$this->PrintOutput(0, "{\$endif}"); $this->PrintOutput(0, "{\$endif}");
} }
// print classes
if ($header["classes"]) { if ($header["classes"]) {
$this->PrintOutput(0, ""); $this->PrintOutput(0, "");
$this->PrintOutput(0, "{\$ifdef CLASSES}"); $this->PrintOutput(0, "{\$ifdef CLASSES}");
@ -1582,13 +1584,12 @@ class ObjectivePParser extends ObjectivePParserBase {
$this->PrintOutput(0, "{\$endif}"); $this->PrintOutput(0, "{\$endif}");
} }
// print protocols
if ($header["protocols"]) { if ($header["protocols"]) {
$this->PrintOutput(0, "{\$ifdef PROTOCOLS}"); $this->PrintOutput(0, "{\$ifdef PROTOCOLS}");
$this->PrintOutput(0, "{\$ifndef $macro"."_PAS_P}"); $this->PrintOutput(0, "{\$ifndef $macro"."_PAS_P}");
$this->PrintOutput(0, "{\$define $macro"."_PAS_P}"); $this->PrintOutput(0, "{\$define $macro"."_PAS_P}");
foreach ($header["protocols"] as $protocol) { foreach ($header["protocols"] as $protocol) {
$this->PrintOutput(1, ""); $this->PrintOutput(1, "");
$this->PrintOutput(0, "{ ".$protocol["name"]." Protocol }"); $this->PrintOutput(0, "{ ".$protocol["name"]." Protocol }");
@ -1946,9 +1947,10 @@ class ObjectivePParser extends ObjectivePParserBase {
$this->PrintOutput(0, ""); $this->PrintOutput(0, "");
$this->PrintOutput(0, "type"); $this->PrintOutput(0, "type");
foreach ($all_classes as $class) foreach ($all_classes as $class) {
$this->PrintOutput(1, $class." = objcclass external;"); $this->PrintOutput(1, $class." = objcclass external;");
}
$this->PrintOutput(0, ""); $this->PrintOutput(0, "");
$this->PrintOutput(0, "implementation"); $this->PrintOutput(0, "implementation");
$this->PrintOutput(0, ""); $this->PrintOutput(0, "");

View File

@ -172,15 +172,15 @@ class ObjectivePParserBase {
// Categories to ignore // Categories to ignore
// NSURLLoading is deprecated in 10.4 and later, and causes problems // NSURLLoading is deprecated in 10.4 and later, and causes problems
// when parsing the iPhoneOS foundation // when parsing the iPhoneOS foundation
var $ignore_categories = array("NSURLLoading", var $ignore_categories = array("NSURLLoading");
);
// Methods to ignore // Methods to ignore
var $ignore_methods = array( "observationInfo", var $ignore_methods = array( "observationInfo",
); );
// methods to rename to particular alternatives // methods to rename to particular alternatives
var $replace_instance_methods = array ( "class" => "_class", ); var $replace_instance_methods = array ( "class" => "_class", );
var $replace_class_methods = array ("respondsToSelector" => "classRespondsToSelector", var $replace_class_methods = array ("respondsToSelector" => "classRespondsToSelector",
"isEqual" => "classIsEqual", "isEqual" => "classIsEqual",
"hash" => "classHash", "hash" => "classHash",
@ -206,10 +206,10 @@ class ObjectivePParserBase {
); );
var $skip_blocks = array( //"^#if __LP64__.*"=>"^#(else|endif)+", var $skip_blocks = array( //"^#if __LP64__.*"=>"^#(else|endif)+",
"^#if __BLOCKS__"=>"^#(else|endif)+", "^#if __BLOCKS__"=>"^#(else|endif)+",
"^#if NS_BLOCKS_AVAILABLE"=>"^#(else|endif)+", "^#if NS_BLOCKS_AVAILABLE"=>"^#(else|endif)+",
"^#ifndef CGFLOAT_DEFINED"=>"^#(else|endif)+", "^#ifndef CGFLOAT_DEFINED"=>"^#(else|endif)+",
); );
var $macro_blocks = array( "^#if \(__LP64__\)"=>"\$ifdef cpu64", var $macro_blocks = array( "^#if \(__LP64__\)"=>"\$ifdef cpu64",
"^#if __LP64__.*"=>"\$ifdef cpu64", "^#if __LP64__.*"=>"\$ifdef cpu64",