summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTyson <Tyson@Ultrabook2>2014-02-07 23:31:59 -0600
committerTyson <Tyson@Ultrabook2>2014-02-07 23:31:59 -0600
commit40ab574dad67091df4517ecac445ce466cf07395 (patch)
tree7a5b7caace93db94b5fb57dca6d5df72e59ebb87 /tests
parent76830a64b219cc2fd76b7ae7de12b717375a6793 (diff)
downloadpygments-40ab574dad67091df4517ecac445ce466cf07395.tar.gz
Added separate lexer to handle CFC. It can handle both tag and script based CFCs.
Diffstat (limited to 'tests')
-rw-r--r--tests/examplefiles/exampleScript.cfc15
-rw-r--r--tests/examplefiles/exampleTag.cfc18
2 files changed, 33 insertions, 0 deletions
diff --git a/tests/examplefiles/exampleScript.cfc b/tests/examplefiles/exampleScript.cfc
new file mode 100644
index 00000000..1e8b2410
--- /dev/null
+++ b/tests/examplefiles/exampleScript.cfc
@@ -0,0 +1,15 @@
+component {
+
+ public any function init(arg1){
+ var this.myVar = arg1;
+
+ return this;
+ }
+
+ private void function testFunc(arg1){
+ if(structKeyExists(arguments, "arg1")){
+ writeoutput("Argument exists");
+ }
+ }
+
+} \ No newline at end of file
diff --git a/tests/examplefiles/exampleTag.cfc b/tests/examplefiles/exampleTag.cfc
new file mode 100644
index 00000000..753bb826
--- /dev/null
+++ b/tests/examplefiles/exampleTag.cfc
@@ -0,0 +1,18 @@
+<cfcomponent>
+
+ <cffunction name="init" access="public" returntype="any">
+ <cfargument name="arg1" type="any" required="true">
+ <cfset this.myVariable = arguments.arg1>
+
+ <cfreturn this>
+ </cffunction>
+
+ <cffunction name="testFunc" access="private" returntype="void">
+ <cfargument name="arg1" type="any" required="false">
+
+ <cfif structKeyExists(arguments, "arg1")>
+ <cfset writeoutput("Argument exists")>
+ </cfif>
+ </cffunction>
+
+</cfcomponent> \ No newline at end of file