From: <sja...@us...> - 2003-11-22 12:19:32
|
Update of /cvsroot/binaryphp/binaryphp In directory sc8-pr-cvs1:/tmp/cvs-serv8629 Modified Files: tokenflow.php Log Message: Fixed lots of whitespace Index: tokenflow.php =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/tokenflow.php,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** tokenflow.php 21 Nov 2003 12:36:43 -0000 1.62 --- tokenflow.php 22 Nov 2003 12:18:49 -0000 1.63 *************** *** 133,138 **** * * @param mixed $break What token to break parameters and move on from. ! * @param mixed $end The token to stop parsing at. This can be a string literal, or an int corresponding to a token. ! * @param bool $for If being called from a for. * @return array * @access private --- 133,138 ---- * * @param mixed $break What token to break parameters and move on from. ! * @param mixed $end The token to stop parsing at. This can be a string literal, or an int corresponding to a token. ! * @param bool $for If being called from a for. * @return array * @access private *************** *** 156,161 **** $code .= $data; } ! if($for) ! --$this->token; break; } --- 156,161 ---- $code .= $data; } ! if($for) ! --$this->token; break; } *************** *** 168,176 **** switch($token) { ! case T_CLASS: ! ++$this->token; ! $this->AddCode('class ' . $this->tokens[$this->token][1]); ! $this->in[] = 'class'; ! break; case T_ECHO: ++$this->token; --- 168,176 ---- switch($token) { ! case T_CLASS: ! ++$this->token; ! $this->AddCode('class ' . $this->tokens[$this->token][1]); ! $this->in[] = 'class'; ! break; case T_ECHO: ++$this->token; *************** *** 179,183 **** else $code .= $this->B_echo($this->Parse_Tokenstream(array('.', ','), ';', true)); ! ++$this->token; break; case ',': --- 179,183 ---- else $code .= $this->B_echo($this->Parse_Tokenstream(array('.', ','), ';', true)); ! ++$this->token; break; case ',': *************** *** 196,200 **** break; case T_VARIABLE: ! $this->token += 1; if($break == null && $end == null) $this->B_var($data, $this->Parse_Tokenstream(null, array(';', ')', ','), $for), true); --- 196,200 ---- break; case T_VARIABLE: ! $this->token += 1; if($break == null && $end == null) $this->B_var($data, $this->Parse_Tokenstream(null, array(';', ')', ','), $for), true); *************** *** 221,230 **** $code .= $data; break; ! case T_NEW: ! $code .= 'new '; ! break; ! case T_OBJECT_OPERATOR: ! $code .= '->'; ! break; case T_IF: ++$this->token; --- 221,230 ---- $code .= $data; break; ! case T_NEW: ! $code .= 'new '; ! break; ! case T_OBJECT_OPERATOR: ! $code .= '->'; ! break; case T_IF: ++$this->token; *************** *** 280,290 **** $code .= ' ' . $token . ' '; break; ! case T_DOUBLE_ARROW: ! $code .= ' => '; ! break; ! case '[': ! case ']': ! $code .= $token; ! break; case T_BOOLEAN_AND: case T_BOOLEAN_OR: --- 280,290 ---- $code .= ' ' . $token . ' '; break; ! case T_DOUBLE_ARROW: ! $code .= ' => '; ! break; ! case '[': ! case ']': ! $code .= $token; ! break; case T_BOOLEAN_AND: case T_BOOLEAN_OR: *************** *** 343,354 **** if($this->Define($var)) $code = 'php_var '; ! else ! $code = (string) null; ! if(substr($val[0], 0, 2) == '->') ! $var = 'OBJECT(' . $var . ', foo)'; ! $code .= $var . implode(' ', $val); if($add) $this->AddCode($code); ! return $code; } /** --- 343,354 ---- if($this->Define($var)) $code = 'php_var '; ! else ! $code = (string) null; ! if(substr($val[0], 0, 2) == '->') ! $var = 'OBJECT(' . $var . ', foo)'; ! $code .= $var . implode(' ', $val); if($add) $this->AddCode($code); ! return $code; } /** *************** *** 680,689 **** $code = (string) null; foreach($this->includes as $include) ! { ! if(file_exists('functions/' . $include)) ! $code .= '#include "functions/' . $include . '"' . "\n"; ! else ! $code .= '#include <' . $include . '>' . "\n"; ! } if(!empty($this->namespace)) $code .= 'using namespace ' . $this->namespace . ';' . "\n"; --- 680,689 ---- $code = (string) null; foreach($this->includes as $include) ! { ! if(file_exists('functions/' . $include)) ! $code .= '#include "functions/' . $include . '"' . "\n"; ! else ! $code .= '#include <' . $include . '>' . "\n"; ! } if(!empty($this->namespace)) $code .= 'using namespace ' . $this->namespace . ';' . "\n"; |