Add python special symbols to PythonTokenId.STD_SYMBOLS
authorJulien Enselme <jenselme@netbeans.org>
Thu, 09 Jul 2015 15:46:07 +0200
changeset 18307a79b4466b5b1
parent 18306 52e4f803a8f8
child 18308 13d93fcd23a0
Add python special symbols to PythonTokenId.STD_SYMBOLS

Concern symbols surrounded by __
python.editor/src/org/netbeans/modules/python/editor/lexer/PythonLexer.java
     1.1 --- a/python.editor/src/org/netbeans/modules/python/editor/lexer/PythonLexer.java	Fri Aug 14 23:18:24 2015 +0200
     1.2 +++ b/python.editor/src/org/netbeans/modules/python/editor/lexer/PythonLexer.java	Thu Jul 09 15:46:07 2015 +0200
     1.3 @@ -923,6 +923,10 @@
     1.4              if (length == 4 && TokenUtilities.textEquals(s, "True")) { // NOI18N
     1.5                  return PythonTokenId.TRUE;
     1.6              }
     1.7 +        case '_': // Special symbols of python
     1.8 +            if (length > 4 && TokenUtilities.startsWith(s, "__") && TokenUtilities.endsWith(s, "__")) { // NOI18N
     1.9 +                return PythonTokenId.STD_SYMBOLS;
    1.10 +            }
    1.11          }
    1.12  
    1.13          return null;