Saturday, August 15, 2009

TextParser class

The TextParser class is the parent class for all parser tools, such as the Antimony parser tool. This class listens to events in the text editor and responds accordingly. This parent class simply provides a basic structure for other parser tools.

activate ()
set this parser as the current parser

deactivate ()
this parser is no longer the current parser

parse (TextEditor *)
this parser has been requested to parse the text inside the given text editor

textChanged (TextEditor *, const QString &, const QString &, const QString &)
some text inside this editor has been changed

lineChanged (TextEditor *, int, const QString &)
the cursor has moved to a different line

validSyntax (bool)
signal indicating invalid syntax

setParser (TextParser *)
set the text parser for all text editors. The current text parser can be obtained using

currentParser();
The current text parser that is being used (can be 0 if none).

No comments: