NAME
Syntax::Highlight::Engine::Kate::Template - a template for syntax highlighting plugins
DESCRIPTION
Syntax::Highlight::Engine::Kate::Template is a framework to assist authors of plugin modules. All methods to provide highlighting to the Syntax::Highlight::Engine::Kate module are there, Just no syntax definitions and callbacks. An instance of Syntax::Highlight::Engine::Kate::Template should never be created, it's meant to be sub classed only.
METHODS
- attributes(?$attributesref?);
-
Sets and returns a reference to the attributes hash.
- basecontext(?$context?);
-
Sets and returns the basecontext instance variable. This is the context that is used when highlighting starts.
- captured($cap);
-
Puts $cap in the first element of the stack, the current context. Used when the context is dynamic.
- capturedGet($num);
-
Returns the $num'th element that was captured in the current context.
- capturedParse($string, $mode);
-
If $mode is specified, $string should only be one character long and numeric. capturedParse will return the Nth captured element of the current context.
If $mode is not specified, all occurences of %[1-9] will be replaced by the captured element of the current context.
- contextInfo($context, $item);
-
returns the value of several context options. $item can be callback, attribute, lineending, linebeginning, fallthrough.
- contextdata(\%data);
-
Sets and returns a reference to the contextdata hash.
- deliminators(?$delim?);
-
Sets and returns a string that is a regular expression for detecting deliminators.
- engine
-
Returns a reference to the Syntax::Highlight::Engine::Kate module that created this plugin.
- includePlugin($language, \$text);
-
Includes the plugin for $language in the highlighting.
- includeRules($language, \$text);
-
Includes the plugin for $language in the highlighting.
- keywordscase
-
Sets and returns the keywordscase instance variable.
- listAdd('listname', $item1, $item2 ...);
-
Adds a list to the 'lists' hash.
- lists(?\%lists?);
-
sets and returns the instance variable 'lists'.
- parseResult(\$text, $match, $lookahaed, $column, $firstnonspace, $context, $attribute);
-
Called by every one of the test methods below. If the test matches, it will do a couple of subtests. If $column is a defined numerical value it will test if the process is at the requested column. If $firnonspace is true, it will test this also. Ig it is not a look ahead and all tests are passed, $match is then parsed and removed from $$text.
The methods below all return a boolean value.
- testAnyChar(\$text, $string, $insensitive, $lookahaed, $column, $firstnonspace, $context, $attribute);
- testDetectChar(\$text, $char, $insensitive, $dynamic, $lookahaed, $column, $firstnonspace, $context, $attribute);
- testDetect2Chars(\$text, $char1, $char2, $insensitive, $dynamic, $lookahaed, $column, $firstnonspace, $context, $attribute);
- testDetectIdentifier(\$text, $lookahaed, $column, $firstnonspace, $context, $attribute);
- testDetectSpaces(\$text, $lookahaed, $column, $firstnonspace, $context, $attribute);
- testFloat(\$text, $lookahaed, $column, $firstnonspace, $context, $attribute);
- testHlCChar(\$text, $lookahaed, $column, $firstnonspace, $context, $attribute);
- testHlCHex(\$text, $lookahaed, $column, $firstnonspace, $context, $attribute);
- testHlCOct(\$text, $lookahaed, $column, $firstnonspace, $context, $attribute);
- testHlCStringChar(\$text, $lookahaed, $column, $firstnonspace, $context, $attribute);
- testInt(\$text, $lookahaed, $column, $firstnonspace, $context, $attribute);
- testKeyword(\$text, $list, $insensitive, $lookahaed, $column, $firstnonspace, $context, $attribute);
- testLineContinue(\$text, $lookahaed, $column, $firstnonspace, $context, $attribute);
- testRangeDetect(\$text, $char1, $char2, $insensitive, $lookahaed, $column, $firstnonspace, $context, $attribute);
- testRegExpr(\$text, $reg, $insensitive, $dynamic, $lookahaed, $column, $firstnonspace, $context, $attribute);
- testStringDetect(\$text, $string, $insensitive, $dynamic, I$lookahaed, $column, $firstnonspace, $context, $attribute);
ACKNOWLEDGEMENTS
All the people who wrote Kate and the syntax highlight xml files.
AUTHOR AND COPYRIGHT
This module is written and maintained by:
Hans Jeuken < haje at toneel dot demon dot nl >
Copyright (c) 2006 by Hans Jeuken, all rights reserved.
You may freely distribute and/or modify this module under same terms as Perl itself
SEE ALSO
Synax::Highlight::Engine::Kate http:://www.kate-editor.org
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 485:
=cut found outside a pod block. Skipping to next block.