Changeset View
Changeset View
Standalone View
Standalone View
parser/phplexer.cpp
Show First 20 Lines • Show All 339 Lines • ▼ Show 20 Line(s) | 339 | if (token != Parser::Token_START_HEREDOC && token != Parser::Token_START_NOWDOC) { | |||
---|---|---|---|---|---|
340 | if ((it + 2)->unicode() == '=') { | 340 | if ((it + 2)->unicode() == '=') { | ||
341 | m_curpos++; | 341 | m_curpos++; | ||
342 | token = Parser::Token_SL_ASSIGN; | 342 | token = Parser::Token_SL_ASSIGN; | ||
343 | } else { | 343 | } else { | ||
344 | token = Parser::Token_SL; | 344 | token = Parser::Token_SL; | ||
345 | } | 345 | } | ||
346 | } | 346 | } | ||
347 | } else if ((it + 1)->unicode() == '=') { | 347 | } else if ((it + 1)->unicode() == '=') { | ||
348 | if ((it + 2)->unicode() == '>') { | ||||
349 | m_curpos += 2; | ||||
350 | token = Parser::Token_SPACESHIP; | ||||
351 | } else { | ||||
348 | m_curpos++; | 352 | m_curpos++; | ||
349 | token = Parser::Token_IS_SMALLER_OR_EQUAL; | 353 | token = Parser::Token_IS_SMALLER_OR_EQUAL; | ||
354 | } | ||||
350 | } else if ((it + 1)->unicode() == '>') { | 355 | } else if ((it + 1)->unicode() == '>') { | ||
351 | m_curpos++; | 356 | m_curpos++; | ||
352 | token = Parser::Token_IS_NOT_EQUAL; | 357 | token = Parser::Token_IS_NOT_EQUAL; | ||
353 | } else { | 358 | } else { | ||
354 | token = Parser::Token_IS_SMALLER; | 359 | token = Parser::Token_IS_SMALLER; | ||
355 | } | 360 | } | ||
356 | } else if (it->unicode() == '>') { | 361 | } else if (it->unicode() == '>') { | ||
357 | if ((it + 1)->unicode() == '>') { | 362 | if ((it + 1)->unicode() == '>') { | ||
Show All 20 Lines | 382 | } else { | |||
378 | token = Parser::Token_COLON; | 383 | token = Parser::Token_COLON; | ||
379 | } | 384 | } | ||
380 | } else if (it->unicode() == '?') { | 385 | } else if (it->unicode() == '?') { | ||
381 | if ((it + 1)->unicode() == '>') { | 386 | if ((it + 1)->unicode() == '>') { | ||
382 | //accept CLOSE_TAG inside StringVariableCurly too, as php does | 387 | //accept CLOSE_TAG inside StringVariableCurly too, as php does | ||
383 | token = Parser::Token_CLOSE_TAG; | 388 | token = Parser::Token_CLOSE_TAG; | ||
384 | m_curpos++; | 389 | m_curpos++; | ||
385 | while (state() != HtmlState) popState(); | 390 | while (state() != HtmlState) popState(); | ||
391 | } else if ((it + 1)->unicode() == '?') { | ||||
392 | token = Parser::Token_NULL_COALESCE; | ||||
393 | m_curpos++; | ||||
386 | } else { | 394 | } else { | ||
387 | token = Parser::Token_QUESTION; | 395 | token = Parser::Token_QUESTION; | ||
388 | } | 396 | } | ||
389 | } else if (it->unicode() == '-' && (it + 1)->unicode() == '>') { | 397 | } else if (it->unicode() == '-' && (it + 1)->unicode() == '>') { | ||
390 | m_curpos++; | 398 | m_curpos++; | ||
391 | token = Parser::Token_OBJECT_OPERATOR; | 399 | token = Parser::Token_OBJECT_OPERATOR; | ||
392 | if (isValidVariableIdentifier(it + 2)) { | 400 | if (isValidVariableIdentifier(it + 2)) { | ||
393 | pushState(StringVariableObjectOperator); | 401 | pushState(StringVariableObjectOperator); | ||
▲ Show 20 Lines • Show All 657 Lines • Show Last 20 Lines |