Commits

Brianna Birman  committed b81202f

No longer case sensitive; supports main sObject entities

  • Participants
  • Parent commits 9dd6334

Comments (0)

Files changed (1)

File pygments/lexers/apex.py

 	aliases = ['apex']
 	filenames = ['*.cls']
 	# mimetypes = ['?']
-		
+
+	flags = re.IGNORECASE | re.MULTILINE
 
     #: optional Comment or Whitespace
    # _ws = r'(?:\s|//.*?\n|/[*].*?[*]/)+'
              Keyword),
             (r'(abstract|const|enum|extends|final|global|implements|native|private|'
              r'protected|public|static|strictfp|super|synchronized|throw|'
-             r'transient|trigger|virtual|volatile|webService|with sharing|without sharing)\b', Keyword.Declaration),
-            (r'(Blob|boolean|date|datetime|decimal|double|id|float|integer|long|string|time)\b',
+             r'transient|trigger|virtual|volatile|void|webService|with sharing|without sharing)\b', Keyword.Declaration),
+            (r'(blob|boolean|date|datetime|decimal|double|id|float|integer|long|string|time)\b',
              Keyword.Type),
 			(r'(insert|update|select|from|where)\b', Keyword), #database operations (use Name.Other?)
+			(r'(account|case|contact|contract|lead|opportunity|sObject)\b', Keyword), #sObjects 
             (r'(package)(\s+)', bygroups(Keyword.Namespace, Text)),
             (r'(true|false|null)\b', Keyword.Constant),
             (r'(class|interface)(\s+)', bygroups(Keyword.Declaration, Text), 'class'),
             (r'(import)(\s+)', bygroups(Keyword.Namespace, Text), 'import'),
-            #(r'\'\*(.*?)*\*/\'', String),	
- 			#(r'"(\\\\|\\"|[^"])*"', String),
             (r"'.*?'", String),
             #(r'(\.)([a-zA-Z_][a-zA-Z0-9_]*)', bygroups(Operator, Name.Attribute)), #highlight attributes 
             (r'[a-zA-Z_][a-zA-Z0-9_]*:', Name.Label),