[DEV] some update (not build)

This commit is contained in:
Edouard DUPIN 2017-12-12 22:09:46 +01:00
parent 7d3c72a405
commit 0f261a0c4c
2 changed files with 8 additions and 5 deletions

View File

@ -131,11 +131,12 @@ etk::Vector<enum stack> m_urrentStack;
etk::String estyle::Generator::process(const etk::String& _code) { etk::String estyle::Generator::process(const etk::String& _code) {
m_lexer.lexify(_code); m_lexer.lexify(_code);
process(0, estyle::lexer::END_OF_FILE) { process(0, m_lexer.size(), estyle::lexer::END_OF_FILE) {
return m_output; return m_output;
}; }
int32_t estyle::Generator::process(int32_t _startId, enum estyle::lexer::tocken _endTocken) {
for (size_t iii = _startId; iii < m_lexer.size(); ++iii) { int32_t estyle::Generator::process(int32_t _startId, int32_t _stopId, enum estyle::lexer::tocken _endTocken) {
for (size_t iii = _startId; iii < _stopId; ++iii) {
enum estyle::lexer::tocken elem = m_lexer.getTocken(iii); enum estyle::lexer::tocken elem = m_lexer.getTocken(iii);
if (elem == _endTocken) { if (elem == _endTocken) {
return iii; return iii;

View File

@ -25,7 +25,9 @@ namespace estyle {
eproperty::List<int32_t> propertyDoxygenMultipleLine; eproperty::List<int32_t> propertyDoxygenMultipleLine;
private: private:
estyle::Lexer m_lexer; estyle::Lexer m_lexer;
int32_t m_indentation = 0; int32_t m_indentation = 0; //!< number of indentation needed in the current line
int32_t m_offset = 0; //!< number od space needed after the indentation (used for the if / else if / while / functions ....)
etk::String m_output; etk::String m_output;
public: public:
etk::String process(const etk::String& _code); etk::String process(const etk::String& _code);