Module: CodeRay::Scanners::PHP_UTF8::RE

Defined in:
lib/milkode/cdweb/lib/coderay_php_utf8.rb

Overview

:nodoc:

Constant Summary collapse

PHP_START =
/
  <script\s+[^>]*?language\s*=\s*"php"[^>]*?> |
  <script\s+[^>]*?language\s*=\s*'php'[^>]*?> |
  <\?php\d? |
  <\?(?!xml)
/xi
PHP_END =
%r!
  </script> |
  \?>
!xi
HTML_INDICATOR =
/<!DOCTYPE html|<(?:html|body|div|p)[> ]/i
IDENTIFIER =

IDENTIFIER = /[a-z_x7f-xFF]*/i

/[a-z_][a-z0-9_]*/i
VARIABLE =
/\$#{IDENTIFIER}/
OPERATOR =
/
  \.(?!\d)=? |      # dot that is not decimal point, string concatenation
  && | \|\| |       # logic
  :: | -> | => |    # scope, member, dictionary
  \\(?!\n) |        # namespace
  \+\+ | -- |       # increment, decrement
  [,;?:()\[\]{}] |  # simple delimiters
  [-+*\/%&|^]=? |   # ordinary math, binary logic, assignment shortcuts
  [~$] |            # whatever
  =& |              # reference assignment
  [=!]=?=? | <> |   # comparison and assignment
  <<=? | >>=? | [<>]=?  # comparison and shift
/x