From c03df1f602170f0018ce808df20f08a880c25ca0 Mon Sep 17 00:00:00 2001 From: jdalegonzalez Date: Sat, 20 Jul 2013 12:29:06 -0400 Subject: [PATCH] Added parser support for traits, namespace declarations, namespace references in class names (\) and the use keyword --- lib/ace/mode/php/php.js | 179 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 168 insertions(+), 11 deletions(-) diff --git a/lib/ace/mode/php/php.js b/lib/ace/mode/php/php.js index d0fa296a..75393d85 100644 --- a/lib/ace/mode/php/php.js +++ b/lib/ace/mode/php/php.js @@ -24,8 +24,6 @@ var PHP = {Constants:{}}; - - PHP.Constants.T_INCLUDE = 262; PHP.Constants.T_INCLUDE_ONCE = 261; PHP.Constants.T_EVAL = 260; @@ -123,7 +121,7 @@ PHP.Constants.T_ISSET = 350; PHP.Constants.T_EMPTY = 351; PHP.Constants.T_HALT_COMPILER = 352; PHP.Constants.T_CLASS = 353; -//PHP.Constants.T_TRAIT = ; +PHP.Constants.T_TRAIT = 382; PHP.Constants.T_INTERFACE = 354; PHP.Constants.T_EXTENDS = 355; PHP.Constants.T_IMPLEMENTS = 356; @@ -172,6 +170,10 @@ PHP.Lexer = function( src, ini ) { openTag = (ini === undefined || (/^(on|true|1)$/i.test(ini.short_open_tag) ) ? /(\<\?php\s|\<\?|\<\%|\