[DEV] update etk null
This commit is contained in:
parent
d36572e9c3
commit
6baf9ff3ae
@ -58,7 +58,7 @@ eci::LexerResult eci::Lexer::interprete(const etk::String& _data) {
|
||||
ECI_INFO("Parse : \n" << _data);
|
||||
for (auto &it : m_searchList) {
|
||||
//ECI_INFO("Parse RegEx : " << it.first << " : " << it.second.getRegExDecorated());
|
||||
if (it == nullptr) {
|
||||
if (it == null) {
|
||||
continue;
|
||||
}
|
||||
if (it->isSubParse() == true) {
|
||||
@ -71,7 +71,7 @@ eci::LexerResult eci::Lexer::interprete(const etk::String& _data) {
|
||||
int32_t start = 0;
|
||||
auto itList(result.m_list.begin());
|
||||
while (itList != result.m_list.end()) {
|
||||
if (*itList == nullptr) {
|
||||
if (*itList == null) {
|
||||
ECI_TODO("remove null shared_ptr");
|
||||
++itList;
|
||||
continue;
|
||||
@ -169,7 +169,7 @@ etk::Vector<ememory::SharedPtr<eci::LexerNode>> eci::Lexer::TypeBase::parse(cons
|
||||
void eci::Lexer::TypeSection::parseSectionCurrent(etk::Vector<ememory::SharedPtr<eci::LexerNode>>& _data) {
|
||||
etk::Vector<size_t> posList;
|
||||
for (size_t iii=0; iii<_data.size(); ++iii) {
|
||||
if (_data[iii] == nullptr) {
|
||||
if (_data[iii] == null) {
|
||||
ECI_TODO("remove null shared_ptr");
|
||||
continue;
|
||||
}
|
||||
@ -203,7 +203,7 @@ void eci::Lexer::TypeSection::parseSectionCurrent(etk::Vector<ememory::SharedPtr
|
||||
void eci::Lexer::TypeSection::parseSection(etk::Vector<ememory::SharedPtr<eci::LexerNode>>& _data) {
|
||||
ECI_VERBOSE("parse section : " << getValue());
|
||||
for (auto &it : _data) {
|
||||
if (it == nullptr) {
|
||||
if (it == null) {
|
||||
continue;
|
||||
}
|
||||
if (it->isNodeContainer() == true) {
|
||||
|
12
eci/Type.hpp
12
eci/Type.hpp
@ -23,7 +23,7 @@ namespace eci {
|
||||
const etk::String& _operatorName,
|
||||
const ememory::SharedPtr<eci::Variable>& _obj) {
|
||||
ECI_ERROR("call unknow operator : '" << _operatorName << "'");
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
virtual etk::Vector<ememory::SharedPtr<eci::Variable>> callFunction(const ememory::SharedPtr<eci::Variable>& _this,
|
||||
const etk::String& _name,
|
||||
@ -34,21 +34,21 @@ namespace eci {
|
||||
virtual ememory::SharedPtr<eci::Variable> getVariable(ememory::SharedPtr<eci::Variable> _this,
|
||||
const etk::String& _name) {
|
||||
ECI_ERROR("try get unknow Variable : '" << _name << "'");
|
||||
return nullptr;
|
||||
return null;
|
||||
};
|
||||
virtual ememory::SharedPtr<eci::Variable> create(const etk::Vector<ememory::SharedPtr<eci::Variable>>& _objList) {
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
virtual void destroy(ememory::SharedPtr<eci::Variable>& _obj) {
|
||||
if (_obj != nullptr) {
|
||||
if (_obj != null) {
|
||||
// TODO : mark as destroyed ...
|
||||
}
|
||||
}
|
||||
virtual ememory::SharedPtr<eci::Variable> clone(const ememory::SharedPtr<eci::Variable>& _obj) {
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
virtual ememory::SharedPtr<eci::Variable> cast(const ememory::SharedPtr<eci::Variable>& _obj, const eci::Type& _type) {
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
};
|
||||
class TypeNatif : public Type {
|
||||
|
@ -38,7 +38,7 @@ eci::ParserCpp::ParserCpp() {
|
||||
m_lexer.append(tokenCppContener, "\\b(class|namespace|struct|union|enum)\\b");
|
||||
m_lexer.append(tokenCppTypeDef, "\\btypedef\\b");
|
||||
m_lexer.append(tokenCppAuto, "\\bauto\\b");
|
||||
m_lexer.append(tokenCppNullptr, "\\b(NULL|nullptr)\\b");
|
||||
m_lexer.append(tokenCppNullptr, "\\b(NULL|null)\\b");
|
||||
m_lexer.append(tokenCppSystemDefine, "\\b__(LINE|DATA|FILE|func|TIME|STDC)__\\b");
|
||||
m_lexer.append(tokenCppNumericValue, "\\b(((0(x|X)[0-9a-fA-F]*)|(\\d+\\.?\\d*|\\.\\d+)((e|E)(\\+|\\-)?\\d+)?)(L|l|UL|ul|u|U|F|f)?)\\b");
|
||||
m_lexer.append(tokenCppBoolean, "\\b(true|false)\\b");
|
||||
@ -63,7 +63,7 @@ static void printNode(const etk::String& _data, const etk::Vector<ememory::Share
|
||||
for (auto &it : _nodes) {
|
||||
if (it->isNodeContainer() == true) {
|
||||
ememory::SharedPtr<eci::LexerNodeContainer> sec = ememory::dynamicPointerCast<eci::LexerNodeContainer>(it);
|
||||
if (sec != nullptr) {
|
||||
if (sec != null) {
|
||||
ECI_INFO(offset << " " << sec->getStartPos() << "->" << sec->getStopPos() << " container: " << sec->getType());
|
||||
printNode(_data, sec->m_list, _level+1);
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ static void printNode(const etk::String& _data, const etk::Vector<ememory::Share
|
||||
for (auto &it : _nodes) {
|
||||
if (it->isNodeContainer() == true) {
|
||||
ememory::SharedPtr<eci::LexerNodeContainer> sec = ememory::dynamicPointerCast<eci::LexerNodeContainer>(it);
|
||||
if (sec != nullptr) {
|
||||
if (sec != null) {
|
||||
ECI_INFO(offset << " " << sec->getStartPos() << "->" << sec->getStopPos() << " container: " << sec->getType());
|
||||
printNode(_data, sec->m_list, _level+1);
|
||||
}
|
||||
|
@ -1,51 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
import lutin.module as module
|
||||
import lutin.tools as tools
|
||||
import os
|
||||
|
||||
def get_type():
|
||||
return "BINARY"
|
||||
|
||||
def get_name():
|
||||
return "ECI"
|
||||
|
||||
def get_desc():
|
||||
return "Ewol C Interpreter"
|
||||
|
||||
def get_licence():
|
||||
return "MPL-2"
|
||||
|
||||
def get_compagny_type():
|
||||
return "org"
|
||||
|
||||
def get_compagny_name():
|
||||
return "Edouard DUPIN"
|
||||
|
||||
def get_maintainer():
|
||||
return ["Mr DUPIN Edouard <yui.heero@gmail.com>"]
|
||||
|
||||
def get_version():
|
||||
return [0,1,"dev"]
|
||||
|
||||
def configure(target, my_module):
|
||||
my_module.add_extra_flags()
|
||||
my_module.add_src_file([
|
||||
'eci/eci.cpp',
|
||||
'eci/Lexer.cpp',
|
||||
'eci/debug.cpp',
|
||||
'eci/Class.cpp',
|
||||
'eci/Enum.cpp',
|
||||
'eci/File.cpp',
|
||||
'eci/Function.cpp',
|
||||
'eci/Interpreter.cpp',
|
||||
'eci/Library.cpp',
|
||||
'eci/Type.cpp',
|
||||
'eci/Variable.cpp',
|
||||
'eci/Value.cpp',
|
||||
'eci/lang/ParserCpp.cpp',
|
||||
'eci/lang/ParserJS.cpp'
|
||||
])
|
||||
my_module.add_path(".", export=True)
|
||||
my_module.add_depend('etk')
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user