Lines Matching defs:idx

34     protected $idx = 0;
48 $idx = 0; // char index for input string
53 $this->idx = &$idx;
61 while ($idx < $slen) {
65 while ($idx < $slen && (strpos(self::CHARS, $source[$idx]) === false)) {
66 $result .= $source[$idx];
67 $idx = $idx + 1;
70 $ch = $source[$idx];
72 if ($ch == '/' && $source[$idx + 1] == '*' && $source[$idx + 2] != '@') {
73 $endC = strpos($source, '*/', $idx + 2);
77 if (substr($source, $idx, $endC + 2 - $idx) == '/* BEGIN NOCOMPRESS */') {
96 $result .= "\n" . trim(substr($source, $idx + 22, $endNC - ($idx + 22))) . "\n"; // BEGIN comment = 22 chars
97 $idx = $endNC + 20; // END comment = 20 chars
99 $idx = $endC + 2;
105 if ($ch == '/' && $source[$idx + 1] == '/') {
106 $endC = strpos($source, "\n", $idx + 2);
108 $idx = $endC;
116 while (in_array($source[$idx - $j], self::WHITESPACE_CHARS)) {
121 function ($e) use ($source, $idx, $j) {
123 $idx = $idx - $j + 1 - $len;
124 return substr($source, $idx, $len) === $e;
132 while ($ccd || $source[$idx + $j] != '/') {
133 if ($source[$idx + $j] == '\\') $j = $j + 2;
137 if ($source[$idx + $j - 1] == '[') $ccd = true;
138 else if ($source[$idx + $j - 1] == ']') $ccd = false;
141 $result .= substr($source, $idx, $j + 1);
142 $idx = $idx + $j + 1;
150 while (($idx + $j < $slen) && $source[$idx + $j] != '"') {
151 if ($source[$idx + $j] == '\\' && ($source[$idx + $j + 1] == '"' || $source[$idx + $j + 1] == '\\')) {
157 $string = substr($source, $idx, $j + 1);
161 $idx = $idx + $j + 1;
168 while (($idx + $j < $slen) && $source[$idx + $j] != "'") {
169 if ($source[$idx + $j] == '\\' && ($source[$idx + $j + 1] == "'" || $source[$idx + $j + 1] == '\\')) {
175 $string = substr($source, $idx, $j + 1);
179 $idx = $idx + $j + 1;
186 while (($idx + $j < $slen) && $source[$idx + $j] != "`") {
187 if ($source[$idx + $j] == '\\' && ($source[$idx + $j + 1] == "`" || $source[$idx + $j + 1] == '\\')) {
193 $string = substr($source, $idx, $j + 1);
197 $idx = $idx + $j + 1;
208 if ($idx + 1 < $slen && ((!$lch || $source[$idx + 1] == ' ')
209 || $lch != $source[$idx + 1]
210 || strpos(self::OPS, $source[$idx + 1]) === false)) {
212 if ($idx + 1 < $slen && (strpos(self::CHARS, $source[$idx + 1]) !== false)) {
213 $idx = $idx + 1;
220 $idx = $idx + 1;
232 $idx = $idx + 1;
248 $before = substr($this->source, max(0, $this->idx - 15), $this->idx);
249 $after = substr($this->source, $this->idx, 15);