summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyson <Tyson@Ultrabook2.SPWiFi>2014-02-11 16:26:45 -0600
committerTyson <Tyson@Ultrabook2.SPWiFi>2014-02-11 16:26:45 -0600
commitaf74bd1af962421eb5fac04ef41e3dcfd59d083a (patch)
tree411d711079e39c32c369f0aa048f1af50a8f9601
parentef1bbdffe2999a9223bde5f0740f1fddbbd88035 (diff)
downloadpygments-af74bd1af962421eb5fac04ef41e3dcfd59d083a.tar.gz
Check for ColdFusion scopes.
-rw-r--r--pygments/lexers/templates.py1
-rw-r--r--tests/examplefiles/exampleScript.cfc7
2 files changed, 8 insertions, 0 deletions
diff --git a/pygments/lexers/templates.py b/pygments/lexers/templates.py
index 9306b660..b6fdaa7e 100644
--- a/pygments/lexers/templates.py
+++ b/pygments/lexers/templates.py
@@ -1500,6 +1500,7 @@ class ColdfusionLexer(RegexLexer):
(r'(if|else|len|var|case|default|break|switch|component|property|function|do|try|catch|in|continue|for|return|while)\b', Keyword),
(r'(required|any|array|binary|boolean|component|date|guid|numeric|query|string|struct|uuid|xml)\b', Keyword),
(r'(true|false|null)\b', Keyword.Constant),
+ (r'(application|session|client|cookie|super|this|variables|arguments)\b', Name.Constant),
(r'([A-Za-z_$][A-Za-z0-9_.]*)(\s*)(\()',
bygroups(Name.Function, Text, Punctuation)),
(r'[A-Za-z_$][A-Za-z0-9_.]*', Name.Variable),
diff --git a/tests/examplefiles/exampleScript.cfc b/tests/examplefiles/exampleScript.cfc
index 5d22c73e..002acbcd 100644
--- a/tests/examplefiles/exampleScript.cfc
+++ b/tests/examplefiles/exampleScript.cfc
@@ -45,6 +45,13 @@ component extends="coldbox.system.orm.hibernate.VirtualEntityService" singleton{
// init it
super.init(entityName=arguments.entityName, useQueryCaching=true);
+ // Test scope coloring in pygments
+ this.colorTestVar = "Just for testing pygments!";
+ cookie.colorTestVar = "";
+ client.colorTestVar = ""
+ session.colorTestVar = "";
+ application.colorTestVar = "";
+
return this;
}