indentation

master
Marius Kintel 2014-08-23 00:57:57 -04:00
parent c9b0a16843
commit 8ab3f843c7
2 changed files with 24 additions and 27 deletions

View File

@ -1,7 +1,7 @@
#include "scadlexer.h" #include "scadlexer.h"
ScadLexer::ScadLexer(QObject *parent) ScadLexer::ScadLexer(QObject *parent)
: QsciLexerCPP(parent) : QsciLexerCPP(parent)
{ } { }
ScadLexer::~ScadLexer() ScadLexer::~ScadLexer()
@ -9,32 +9,30 @@ ScadLexer::~ScadLexer()
const char *ScadLexer::language() const const char *ScadLexer::language() const
{ {
return "SCAD"; return "SCAD";
} }
const char *ScadLexer::keywords(int set) const const char *ScadLexer::keywords(int set) const
{ {
if (set == 1) if (set == 1)
return "if else for module function intersection_for assign echo search " return "if else for module function intersection_for assign echo search "
" str let true false "; // -> Style: Keyword " str let true false "; // -> Style: Keyword
if (set == 2) if (set == 2)
return " abs sign acos asin atan atan2 sin cos tan floor round ceil len ln " return " abs sign acos asin atan atan2 sin cos tan floor round ceil len ln "
" log lookup min max pow sqrt exp rands version version_num " " log lookup min max pow sqrt exp rands version version_num "
" group difference union intersection render translate rotate scale multmatrix color " " group difference union intersection render translate rotate scale multmatrix color "
" projection hull resize mirror minkowski glide subdiv child " " projection hull resize mirror minkowski glide subdiv child "
" include use dxf_dim dxf_cross " " include use dxf_dim dxf_cross "
" linear_extrude rotate_extrude "; // -> Style: KeywordSet2 " linear_extrude rotate_extrude "; // -> Style: KeywordSet2
if (set == 3) if (set == 3)
return " param author "; // -> used in comments only like /*! \cube */ return " param author "; // -> used in comments only like /*! \cube */
if (set == 4) if (set == 4)
return "cube circle cylinder polygon polyhedron square sphere " return "cube circle cylinder polygon polyhedron square sphere "
"surface import "; // -> Style: GlobalClass "surface import "; // -> Style: GlobalClass
return 0; return 0;
} }

View File

@ -8,13 +8,12 @@
class ScadLexer : public QsciLexerCPP class ScadLexer : public QsciLexerCPP
{ {
public: public:
ScadLexer(QObject *parent); ScadLexer(QObject *parent);
virtual ~ScadLexer(); virtual ~ScadLexer();
const char *language() const; const char *language() const;
const char *keywords(int set) const; const char *keywords(int set) const;
private: private:
ScadLexer(const ScadLexer &); ScadLexer(const ScadLexer &);
ScadLexer &operator=(const ScadLexer &); ScadLexer &operator=(const ScadLexer &);
}; };