KDevelop API Documentation

yyindent.cpp File Reference

#include <qregexp.h>
#include <qmap.h>
#include <qvariant.h>
#include <kdebug.h>

Include dependency graph for yyindent.cpp:

Include dependency graph

Go to the source code of this file.

Classes

struct  LinizerState

Defines

#define YY_SAVE()   LinizerState savedState = *yyLinizerState
#define YY_RESTORE()   *yyLinizerState = savedState

Functions

void configureCIndent (const QMap< QString, QVariant > &values)
QChar firstNonWhiteSpace (const QString &t)
bool isOnlyWhiteSpace (const QString &t)
int columnForIndex (const QString &t, int index)
int indentOfLine (const QString &t)
void eraseChar (QString &t, int k, QChar ch)
QString trimmedCodeLine (const QString &t)
QChar lastParen (const QString &t)
bool okay (QChar typedIn, QChar okayCh)
bool readLine ()
void startLinizer ()
bool bottomLineStartsInCComment ()
int indentWhenBottomLineStartsInCComment ()
bool matchBracelessControlStatement ()
bool isUnfinishedLine ()
bool isContinuationLine ()
int indentForContinuationLine ()
int indentForStandaloneLine ()
void initializeIndenter ()
void terminateIndenter ()
int indentForBottomLine (const QStringList &program, QChar typedIn)

Variables

const int SmallRoof = 40
const int BigRoof = 400
int ppHardwareTabSize = 8
int ppIndentSize = 4
int ppContinuationIndentSize = 8
int ppCommentOffset = 2
QRegExpliteral = 0
QRegExplabel = 0
QRegExpinlineCComment = 0
QRegExpbraceX = 0
QRegExpiflikeKeyword = 0
QStringListyyProgram = 0
LinizerStateyyLinizerState = 0
const QStringyyLine = 0
const int * yyBraceDepth = 0
const boolyyLeftBraceFollows = 0


Define Documentation

 
#define YY_RESTORE  )     *yyLinizerState = savedState
 

Definition at line 295 of file yyindent.cpp.

Referenced by indentForStandaloneLine(), isContinuationLine(), and isUnfinishedLine().

 
#define YY_SAVE  )     LinizerState savedState = *yyLinizerState
 

Definition at line 293 of file yyindent.cpp.

Referenced by indentForStandaloneLine(), isContinuationLine(), and isUnfinishedLine().


Function Documentation

bool bottomLineStartsInCComment  )  [static]
 

Definition at line 431 of file yyindent.cpp.

References trimmedCodeLine(), and yyProgram.

Referenced by indentForBottomLine().

int columnForIndex const QString t,
int  index
[static]
 

Definition at line 144 of file yyindent.cpp.

Referenced by indentForContinuationLine(), indentOfLine(), and indentWhenBottomLineStartsInCComment().

void configureCIndent const QMap< QString, QVariant > &  values  ) 
 

Definition at line 100 of file yyindent.cpp.

References ppCommentOffset, ppContinuationIndentSize, ppHardwareTabSize, and ppIndentSize.

Referenced by CIndent::CIndent(), and CIndent::updateValues().

void eraseChar QString t,
int  k,
QChar  ch
[inline, static]
 

Definition at line 174 of file yyindent.cpp.

Referenced by readLine(), and trimmedCodeLine().

QChar firstNonWhiteSpace const QString t  )  [static]
 

Definition at line 119 of file yyindent.cpp.

Referenced by indentForBottomLine(), indentOfLine(), isOnlyWhiteSpace(), and readLine().

int indentForBottomLine const QStringList program,
QChar  typedIn
 

Definition at line 997 of file yyindent.cpp.

References bottomLineStartsInCComment(), firstNonWhiteSpace(), indentForContinuationLine(), indentForStandaloneLine(), indentOfLine(), indentWhenBottomLineStartsInCComment(), initializeIndenter(), isOnlyWhiteSpace(), isUnfinishedLine(), okay(), startLinizer(), terminateIndenter(), and yyProgram.

Referenced by CIndent::indentForLine().

int indentForContinuationLine  )  [static]
 

Definition at line 664 of file yyindent.cpp.

References columnForIndex(), indentOfLine(), isContinuationLine(), readLine(), and yyLine.

Referenced by indentForBottomLine().

int indentForStandaloneLine  )  [static]
 

Definition at line 877 of file yyindent.cpp.

References indentOfLine(), isContinuationLine(), matchBracelessControlStatement(), readLine(), YY_RESTORE, YY_SAVE, yyBraceDepth, yyLine, and yyLinizerState.

Referenced by indentForBottomLine().

int indentOfLine const QString t  )  [static]
 

Definition at line 163 of file yyindent.cpp.

References columnForIndex(), and firstNonWhiteSpace().

Referenced by indentForBottomLine(), indentForContinuationLine(), indentForStandaloneLine(), and indentWhenBottomLineStartsInCComment().

int indentWhenBottomLineStartsInCComment  )  [static]
 

Definition at line 470 of file yyindent.cpp.

References columnForIndex(), indentOfLine(), and yyLine.

Referenced by indentForBottomLine().

void initializeIndenter  )  [static]
 

Definition at line 960 of file yyindent.cpp.

References braceX, iflikeKeyword, inlineCComment, label, literal, and yyLinizerState.

Referenced by indentForBottomLine().

bool isContinuationLine  )  [static]
 

Definition at line 645 of file yyindent.cpp.

References isUnfinishedLine(), readLine(), YY_RESTORE, and YY_SAVE.

Referenced by indentForContinuationLine(), and indentForStandaloneLine().

bool isOnlyWhiteSpace const QString t  )  [static]
 

Definition at line 134 of file yyindent.cpp.

References firstNonWhiteSpace().

Referenced by indentForBottomLine().

bool isUnfinishedLine  )  [static]
 

Definition at line 599 of file yyindent.cpp.

References lastParen(), matchBracelessControlStatement(), readLine(), YY_RESTORE, YY_SAVE, and yyLine.

Referenced by indentForBottomLine(), and isContinuationLine().

QChar lastParen const QString t  )  [inline, static]
 

Definition at line 242 of file yyindent.cpp.

Referenced by isUnfinishedLine().

bool matchBracelessControlStatement  )  [static]
 

Definition at line 514 of file yyindent.cpp.

References iflikeKeyword, readLine(), and yyLine.

Referenced by indentForStandaloneLine(), and isUnfinishedLine().

bool okay QChar  typedIn,
QChar  okayCh
[inline, static]
 

Definition at line 257 of file yyindent.cpp.

Referenced by indentForBottomLine().

bool readLine  )  [static]
 

Definition at line 303 of file yyindent.cpp.

References LinizerState::braceDepth, braceX, eraseChar(), firstNonWhiteSpace(), LinizerState::inCComment, LinizerState::iter, LinizerState::leftBraceFollows, LinizerState::line, LinizerState::pendingRightBrace, trimmedCodeLine(), yyLinizerState, and yyProgram.

Referenced by indentForContinuationLine(), indentForStandaloneLine(), isContinuationLine(), isUnfinishedLine(), matchBracelessControlStatement(), and startLinizer().

void startLinizer  )  [static]
 

Definition at line 410 of file yyindent.cpp.

References LinizerState::braceDepth, LinizerState::inCComment, LinizerState::iter, LinizerState::leftBraceFollows, LinizerState::line, LinizerState::pendingRightBrace, readLine(), yyBraceDepth, yyLeftBraceFollows, yyLine, yyLinizerState, and yyProgram.

Referenced by indentForBottomLine().

void terminateIndenter  )  [static]
 

Definition at line 977 of file yyindent.cpp.

Referenced by indentForBottomLine().

QString trimmedCodeLine const QString t  )  [static]
 

Definition at line 184 of file yyindent.cpp.

References eraseChar(), inlineCComment, label, and literal.

Referenced by bottomLineStartsInCComment(), and readLine().


Variable Documentation

const int BigRoof = 400 [static]
 

Definition at line 74 of file yyindent.cpp.

QRegExp* braceX = 0 [static]
 

Definition at line 96 of file yyindent.cpp.

Referenced by initializeIndenter(), and readLine().

QRegExp* iflikeKeyword = 0 [static]
 

Definition at line 97 of file yyindent.cpp.

Referenced by initializeIndenter(), and matchBracelessControlStatement().

QRegExp* inlineCComment = 0 [static]
 

Definition at line 95 of file yyindent.cpp.

Referenced by initializeIndenter(), and trimmedCodeLine().

QRegExp* label = 0 [static]
 

Definition at line 94 of file yyindent.cpp.

Referenced by initializeIndenter(), and trimmedCodeLine().

QRegExp* literal = 0 [static]
 

Definition at line 93 of file yyindent.cpp.

Referenced by initializeIndenter(), and trimmedCodeLine().

int ppCommentOffset = 2 [static]
 

Definition at line 91 of file yyindent.cpp.

Referenced by configureCIndent().

int ppContinuationIndentSize = 8 [static]
 

Definition at line 90 of file yyindent.cpp.

Referenced by configureCIndent().

int ppHardwareTabSize = 8 [static]
 

Definition at line 88 of file yyindent.cpp.

Referenced by configureCIndent().

int ppIndentSize = 4 [static]
 

Definition at line 89 of file yyindent.cpp.

Referenced by configureCIndent().

const int SmallRoof = 40 [static]
 

Definition at line 73 of file yyindent.cpp.

const int* yyBraceDepth = 0 [static]
 

Definition at line 286 of file yyindent.cpp.

Referenced by indentForStandaloneLine(), and startLinizer().

const bool* yyLeftBraceFollows = 0 [static]
 

Definition at line 287 of file yyindent.cpp.

Referenced by startLinizer().

const QString* yyLine = 0 [static]
 

Definition at line 285 of file yyindent.cpp.

Referenced by indentForContinuationLine(), indentForStandaloneLine(), indentWhenBottomLineStartsInCComment(), isUnfinishedLine(), matchBracelessControlStatement(), and startLinizer().

LinizerState* yyLinizerState = 0 [static]
 

Definition at line 282 of file yyindent.cpp.

Referenced by indentForStandaloneLine(), initializeIndenter(), readLine(), and startLinizer().

QStringList* yyProgram = 0 [static]
 

Definition at line 281 of file yyindent.cpp.

Referenced by bottomLineStartsInCComment(), indentForBottomLine(), readLine(), and startLinizer().

KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:06:19 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003