Exemplo n.º 1
0
 public function read_escaped_char()
 {
     $ch = $this->next(true);
     switch ($char) {
         case 'n':
             return "\n";
         case 'r':
             return "\r";
         case 't':
             return "\t";
         case 'b':
             return "\\b";
         case 'v':
             return "\v";
         case 'f':
             return "\f";
         case '0':
             return "";
         case 'x':
             return ParseJS::unichr($this->hex_bytes(2));
         case 'u':
             return ParseJS::unichr($this->hex_bytes(4));
         default:
             return $ch;
     }
 }