OpenMW
Public Types | Public Member Functions | Private Member Functions | Private Attributes
CSVWorld::ScriptHighlighter Class Reference

#include <scripthighlighter.hpp>

List of all members.

Public Types

enum  Type {
  Type_Int, Type_Float, Type_Name, Type_Keyword,
  Type_Special, Type_Comment, Type_Id
}

Public Member Functions

 ScriptHighlighter (const CSMWorld::Data &data, QTextDocument *parent)
virtual void highlightBlock (const QString &text)
void invalidateIds ()

Private Member Functions

virtual bool parseInt (int value, const Compiler::TokenLoc &loc, Compiler::Scanner &scanner)
virtual bool parseFloat (float value, const Compiler::TokenLoc &loc, Compiler::Scanner &scanner)
virtual bool parseName (const std::string &name, const Compiler::TokenLoc &loc, Compiler::Scanner &scanner)
virtual bool parseKeyword (int keyword, const Compiler::TokenLoc &loc, Compiler::Scanner &scanner)
virtual bool parseSpecial (int code, const Compiler::TokenLoc &loc, Compiler::Scanner &scanner)
virtual bool parseComment (const std::string &comment, const Compiler::TokenLoc &loc, Compiler::Scanner &scanner)
virtual void parseEOF (Compiler::Scanner &scanner)
 Handle EOF token.
void highlight (const Compiler::TokenLoc &loc, Type type)

Private Attributes

Compiler::NullErrorHandler mErrorHandler
Compiler::Extensions mExtensions
CSMWorld::ScriptContext mContext
std::map< Type, QTextCharFormat > mScheme

Member Enumeration Documentation

Enumerator:
Type_Int 
Type_Float 
Type_Name 
Type_Keyword 
Type_Special 
Type_Comment 
Type_Id 

Constructor & Destructor Documentation

CSVWorld::ScriptHighlighter::ScriptHighlighter ( const CSMWorld::Data data,
QTextDocument *  parent 
)
Todo:
replace this with user settings

Member Function Documentation

void CSVWorld::ScriptHighlighter::highlight ( const Compiler::TokenLoc loc,
Type  type 
) [private]
void CSVWorld::ScriptHighlighter::highlightBlock ( const QString &  text) [virtual]
bool CSVWorld::ScriptHighlighter::parseComment ( const std::string &  comment,
const Compiler::TokenLoc loc,
Compiler::Scanner scanner 
) [private, virtual]

Handle comment token.

Returns:
fetch another token?

Reimplemented from Compiler::Parser.

void CSVWorld::ScriptHighlighter::parseEOF ( Compiler::Scanner scanner) [private, virtual]

Handle EOF token.

Reimplemented from Compiler::Parser.

bool CSVWorld::ScriptHighlighter::parseFloat ( float  value,
const Compiler::TokenLoc loc,
Compiler::Scanner scanner 
) [private, virtual]

Handle a float token.

Returns:
fetch another token?

Reimplemented from Compiler::Parser.

bool CSVWorld::ScriptHighlighter::parseInt ( int  value,
const Compiler::TokenLoc loc,
Compiler::Scanner scanner 
) [private, virtual]

Handle an int token.

Returns:
fetch another token?

Reimplemented from Compiler::Parser.

bool CSVWorld::ScriptHighlighter::parseKeyword ( int  keyword,
const Compiler::TokenLoc loc,
Compiler::Scanner scanner 
) [private, virtual]

Handle a keyword token.

Returns:
fetch another token?

Reimplemented from Compiler::Parser.

bool CSVWorld::ScriptHighlighter::parseName ( const std::string &  name,
const Compiler::TokenLoc loc,
Compiler::Scanner scanner 
) [private, virtual]

Handle a name token.

Returns:
fetch another token?

Reimplemented from Compiler::Parser.

bool CSVWorld::ScriptHighlighter::parseSpecial ( int  code,
const Compiler::TokenLoc loc,
Compiler::Scanner scanner 
) [private, virtual]

Handle a special character token.

Returns:
fetch another token?

Reimplemented from Compiler::Parser.


Member Data Documentation

Reimplemented from Compiler::Parser.

Reimplemented from Compiler::Parser.

std::map<Type, QTextCharFormat> CSVWorld::ScriptHighlighter::mScheme [private]

The documentation for this class was generated from the following files: