Scroll to navigation

Syntax::Highlight::Engine::Kate::Template(3) User Contributed Perl Documentation Syntax::Highlight::Engine::Kate::Template(3)

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

Sets and returns a reference to the attributes hash.
Sets and returns the basecontext instance variable. This is the context that is used when highlighting starts.
Puts $cap in the first element of the stack, the current context. Used when the context is dynamic.
Returns the $num'th element that was captured in the current context.
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.

returns the column position in the line that is currently highlighted.
Sets and returns a reference to the contextdata hash.
returns the value of several context options. $item can be callback, attribute, lineending, linebeginning, fallthrough.
Called by the plugins after a test succeeds. if $context has following values:

 #pop       returns to the previous context, removes to top item in the stack. Can
            also be specified as #pop#pop etc.
 #stay      does nothing.
 ##....     Switches to the plugin specified in .... and assumes it's basecontext.
 ....       Swtiches to the context specified in ....
    
Sets and returns a string that is a regular expression for detecting deliminators.
Returns a reference to the Syntax::Highlight::Engine::Kate module that created this plugin.
returns true if the current line did not contain a non-spatial character so far and the first character in $string is also a spatial character.
sets and returns the instance variable format_table. See also the option format_table
highlights $text. It does so by selecting the proper callback from the commands hash and invoke it. It will do so untill $text has been reduced to an empty string. returns a paired list of snippets of text and the attribute with which they should be highlighted.
highlights $text and reformats it using the format_table and substitutions
Includes the plugin for $language in the highlighting.
Includes the plugin for $language in the highlighting.
Sets and returns the keywordscase instance variable.
return the last character that was processed.
returns true if the last character processed was a deliminator.
returns the string of text in the current line that has been processed so far,
returns true if processing is currently at the beginning of a line.
Adds a list to the 'lists' hash.
sets and returns the instance variable 'lists'.
sets and returns the instance variable 'out'.
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.
Returns a reference to a plugin object for the specified language. Creating an instance if needed.
Resets the highlight engine to a fresh state, does not change the syntx.
Contains the current snippet of text that will have one attribute. The moment the attribute changes it will be parsed.
appends $string to the current snippet.
Sets and returns the used attribute.
Forces the current snippet to be parsed.
If attribute is defined and differs from the current attribute it does a snippetForce and sets the current attribute to $attribute. Then it does a snippetAppend of $text
sets and returns the instance variable 'stack', a reference to an array
retrieves the element that is on top of the stack, decrements stacksize by 1.
puts $tagname on top of the stack, increments stacksize by 1
Retrieves the element that is on top of the stack.
Compares two lists, \@state and the stack. returns true if they match.
Returns a list containing the entire stack.
Accepts @list as the current stack.
sets and returns a reference to the substitutions hash.

The methods below all return a boolean value.

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

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

=cut found outside a pod block. Skipping to next block.
2010-12-13 perl v5.10.1