summaryrefslogtreecommitdiff
path: root/pygments/token.py
diff options
context:
space:
mode:
authorblackbird <devnull@localhost>2006-11-18 21:10:27 +0100
committerblackbird <devnull@localhost>2006-11-18 21:10:27 +0100
commitb9e3b75424f7d5dc2e66d28da6c7f6a176089532 (patch)
treecef29d576b707c034479d6e3e878e44997136edb /pygments/token.py
parent7a505b67251a6b46f02f90abc68af64c099eb3e7 (diff)
downloadpygments-b9e3b75424f7d5dc2e66d28da6c7f6a176089532.tar.gz
[svn] added improved pascal lexer
Diffstat (limited to 'pygments/token.py')
-rw-r--r--pygments/token.py28
1 files changed, 16 insertions, 12 deletions
diff --git a/pygments/token.py b/pygments/token.py
index 6c30442c..b49fd61a 100644
--- a/pygments/token.py
+++ b/pygments/token.py
@@ -36,25 +36,26 @@ class _TokenType(tuple):
return 'Token' + (self and '.' or '') + '.'.join(self)
-Token = _TokenType()
+Token = _TokenType()
# Special token types
-Text = Token.Text
-Error = Token.Error
+Text = Token.Text
+Error = Token.Error
# Text that doesn't belong to this lexer (e.g. HTML in PHP)
-Other = Token.Other
+Other = Token.Other
# Common token types for source code
-Keyword = Token.Keyword
-Name = Token.Name
-Literal = Token.Literal
-String = Literal.String
-Number = Literal.Number
-Operator = Token.Operator
-Comment = Token.Comment
+Keyword = Token.Keyword
+Name = Token.Name
+Literal = Token.Literal
+String = Literal.String
+Number = Literal.Number
+Punctuation = Literal.Punctuation
+Operator = Token.Operator
+Comment = Token.Comment
# Generic types for non-source code
-Generic = Token.Generic
+Generic = Token.Generic
def is_token_subtype(ttype, other):
@@ -93,6 +94,7 @@ STANDARD_TYPES = {
Name.Entity: 'ni',
Name.Exception: 'ne',
Name.Function: 'nf',
+ Name.Property: 'py',
Name.Label: 'nl',
Name.Namespace: 'nn',
Name.Other: 'nx',
@@ -128,6 +130,8 @@ STANDARD_TYPES = {
Operator: 'o',
Operator.Word: 'ow',
+ Punctuation: 'p',
+
Comment: 'c',
Comment.Multiline: 'cm',
Comment.Preproc: 'cp',