Esempio n. 1
0
 /**
  * 
  * 获取数值Token
  */
 public function getNumberToken($char)
 {
     $result = $this->getNextChar();
     while ($this->pos < $this->length) {
         $tmp = $result . $this->text[$this->pos];
         if (!Fl_Js_Static::isNumberPrefix($tmp) && !Fl_Js_Static::isNumber($tmp)) {
             break;
         }
         $result .= $this->getNextChar();
     }
     return $result;
 }
Esempio n. 2
0
 /**
  * 
  * 获取数值Token
  */
 public function getNumberToken($char)
 {
     $this->tmp .= $char;
     if (!Fl_Js_Static::isNumberPrefix($this->tmp) && !Fl_Js_Static::isNumber($this->tmp)) {
         $this->tmp = '';
         $this->pendingNextChar = true;
         return true;
     }
 }