Remove 'unsigned' in match compiler
This commit is contained in:
parent
38182bf37b
commit
5bc0347fd5
|
@ -130,7 +130,7 @@ class MatchCompiler:
|
||||||
else:
|
else:
|
||||||
arg2 = ''
|
arg2 = ''
|
||||||
if varid:
|
if varid:
|
||||||
arg2 = ', const unsigned int varid'
|
arg2 = ', const int varid'
|
||||||
|
|
||||||
ret = '// pattern: ' + pattern + '\n'
|
ret = '// pattern: ' + pattern + '\n'
|
||||||
ret += 'static bool match' + \
|
ret += 'static bool match' + \
|
||||||
|
@ -214,7 +214,7 @@ class MatchCompiler:
|
||||||
more_args += ', const Token * end'
|
more_args += ', const Token * end'
|
||||||
endCondition = ' && start_tok != end'
|
endCondition = ' && start_tok != end'
|
||||||
if varId:
|
if varId:
|
||||||
more_args += ', unsigned int varid'
|
more_args += ', int varid'
|
||||||
|
|
||||||
ret = '// pattern: ' + pattern + '\n'
|
ret = '// pattern: ' + pattern + '\n'
|
||||||
ret += 'template<class T> static T * findmatch' + \
|
ret += 'template<class T> static T * findmatch' + \
|
||||||
|
@ -298,7 +298,7 @@ class MatchCompiler:
|
||||||
is_simplematch, verifyNumber, pattern, patternNumber, varId):
|
is_simplematch, verifyNumber, pattern, patternNumber, varId):
|
||||||
more_args = ''
|
more_args = ''
|
||||||
if varId:
|
if varId:
|
||||||
more_args = ', const unsigned int varid'
|
more_args = ', const int varid'
|
||||||
|
|
||||||
ret = 'static bool match_verify' + \
|
ret = 'static bool match_verify' + \
|
||||||
str(verifyNumber) + '(const Token *tok' + more_args + ') {\n'
|
str(verifyNumber) + '(const Token *tok' + more_args + ') {\n'
|
||||||
|
@ -428,7 +428,7 @@ class MatchCompiler:
|
||||||
if endToken:
|
if endToken:
|
||||||
more_args += ', const Token * endToken'
|
more_args += ', const Token * endToken'
|
||||||
if varId:
|
if varId:
|
||||||
more_args += ', const unsigned int varid'
|
more_args += ', const int varid'
|
||||||
|
|
||||||
ret = 'template < class T > static T * findmatch_verify' + \
|
ret = 'template < class T > static T * findmatch_verify' + \
|
||||||
str(verifyNumber) + '(T * tok' + more_args + ') {\n'
|
str(verifyNumber) + '(T * tok' + more_args + ') {\n'
|
||||||
|
@ -547,9 +547,9 @@ class MatchCompiler:
|
||||||
# Function prototypes:
|
# Function prototypes:
|
||||||
# Token *findsimplematch(const Token *tok, const char pattern[]);
|
# Token *findsimplematch(const Token *tok, const char pattern[]);
|
||||||
# Token *findsimplematch(const Token *tok, const char pattern[], const Token *end);
|
# Token *findsimplematch(const Token *tok, const char pattern[], const Token *end);
|
||||||
# Token *findmatch(const Token *tok, const char pattern[], unsigned int varId = 0);
|
# Token *findmatch(const Token *tok, const char pattern[], int varId = 0);
|
||||||
# Token *findmatch(const Token *tok, const char pattern[], const
|
# Token *findmatch(const Token *tok, const char pattern[], const
|
||||||
# Token *end, unsigned int varId = 0);
|
# Token *end, int varId = 0);
|
||||||
endToken = None
|
endToken = None
|
||||||
if ((is_findsimplematch and len(res) == 4) or
|
if ((is_findsimplematch and len(res) == 4) or
|
||||||
(not is_findsimplematch and varId and (len(res) == 5)) or
|
(not is_findsimplematch and varId and (len(res) == 5)) or
|
||||||
|
|
Loading…
Reference in New Issue