From: <tec...@us...> - 2007-05-02 12:19:57
|
Revision: 990 http://svn.sourceforge.net/colorer/?rev=990&view=rev Author: techtonik Date: 2007-05-02 05:19:50 -0700 (Wed, 02 May 2007) Log Message: ----------- + highlight Python integers with error reporting Modified Paths: -------------- branches/TECHTONIK-HRC-REF/colorer/hrc/base/python.hrc Modified: branches/TECHTONIK-HRC-REF/colorer/hrc/base/python.hrc =================================================================== --- branches/TECHTONIK-HRC-REF/colorer/hrc/base/python.hrc 2007-05-02 12:03:01 UTC (rev 989) +++ branches/TECHTONIK-HRC-REF/colorer/hrc/base/python.hrc 2007-05-02 12:19:50 UTC (rev 990) @@ -21,6 +21,8 @@ <region name="pyComment" parent="def:Comment"/> <region name="pyString" parent="def:String"/> <region name="pyStringEscape" parent="def:StringContent"/> + <region name="pyNumber" parent="def:Number"/> + <region name="pyNumberSuffix" parent="def:NumberSuffix"/> <scheme name="StringCommon"> <!-- common escapes for all types of Python strings --> @@ -84,6 +86,14 @@ <block start="/((u|U)?(r|R)?)(')/" end="/\y4/" scheme="StringSingle" region="pyString"/> <block start="/((u|U)?(r|R)?)(")/" end="/\y4/" scheme="StringDouble" region="pyString"/> + <!-- python integers : http://docs.python.org/ref/integers.html --> + <!-- octal --> + <regexp match="/\b(0[0-7]*)([Ll])?(\w*)\b/" region1="pyNumber" region2="pyNumberSuffix" region3="def:Error" /> + <!-- decimal --> + <regexp match="/\b([1-9]\d*)([Ll])?(\w*)\b/" region1="pyNumber" region2="pyNumberSuffix" region3="def:Error" /> + <!-- hex --> + <regexp match="/\b(0[xX][0-9a-fA-F]*)([Ll])?(\w*)\b/" region1="pyNumber" region2="pyNumberSuffix" region3="def:Error" /> + </scheme> </type> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |