remove whitespace
This commit is contained in:
parent
0824e52aa0
commit
7d643a9ae4
@ -1833,7 +1833,7 @@ void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt)
|
||||
{
|
||||
decompile_loop(stmt, i, j);
|
||||
i = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -325,7 +325,7 @@ auto lexer::lex() -> xsk::gsc::h1::parser::symbol_type
|
||||
{
|
||||
color = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (color) return h1::parser::make_COLOR(std::string(++data, --len), loc_);
|
||||
@ -335,17 +335,17 @@ auto lexer::lex() -> xsk::gsc::h1::parser::symbol_type
|
||||
|
||||
if (key == keyword::KW_INVALID)
|
||||
throw h1::parser::syntax_error(loc_, utils::string::va("unknown preprocessor directive ('%s')", "#"));
|
||||
|
||||
|
||||
if (keyword_is_token(key))
|
||||
return keyword_token(key);
|
||||
|
||||
// call preprocessor(key);
|
||||
// call preprocessor(key);
|
||||
}
|
||||
continue;
|
||||
case '*':
|
||||
if (reader_.state == reader::end || (curr != '/' && curr != '='))
|
||||
return h1::parser::make_MUL(loc_);
|
||||
|
||||
|
||||
reader_.advance();
|
||||
|
||||
if (curr == '/')
|
||||
@ -399,24 +399,24 @@ auto lexer::lex() -> xsk::gsc::h1::parser::symbol_type
|
||||
if (curr != '=')
|
||||
return h1::parser::make_MOD(loc_);
|
||||
reader_.advance();
|
||||
return h1::parser::make_ASSIGN_MOD(loc_);
|
||||
return h1::parser::make_ASSIGN_MOD(loc_);
|
||||
case '|':
|
||||
if (curr != '|' && curr != '=')
|
||||
return h1::parser::make_BITWISE_OR(loc_);
|
||||
reader_.advance();
|
||||
return (last == '|') ? h1::parser::make_OR(loc_) : h1::parser::make_ASSIGN_BW_OR(loc_);
|
||||
return (last == '|') ? h1::parser::make_OR(loc_) : h1::parser::make_ASSIGN_BW_OR(loc_);
|
||||
case '&':
|
||||
if (curr != '&' && curr != '=' && curr != '"' && curr != '\'')
|
||||
return h1::parser::make_BITWISE_AND(loc_);
|
||||
reader_.advance();
|
||||
if (last == '"' || last == '\'')
|
||||
return read_string(last, true);
|
||||
return (last == '&') ? h1::parser::make_AND(loc_) : h1::parser::make_ASSIGN_BW_AND(loc_);
|
||||
return (last == '&') ? h1::parser::make_AND(loc_) : h1::parser::make_ASSIGN_BW_AND(loc_);
|
||||
case '^':
|
||||
if (curr != '=')
|
||||
return h1::parser::make_BITWISE_EXOR(loc_);
|
||||
reader_.advance();
|
||||
return h1::parser::make_ASSIGN_BW_EXOR(loc_);
|
||||
return h1::parser::make_ASSIGN_BW_EXOR(loc_);
|
||||
case '!':
|
||||
if (curr != '=')
|
||||
return h1::parser::make_NOT(loc_);
|
||||
|
@ -1833,7 +1833,7 @@ void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt)
|
||||
{
|
||||
decompile_loop(stmt, i, j);
|
||||
i = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -325,7 +325,7 @@ auto lexer::lex() -> xsk::gsc::h2::parser::symbol_type
|
||||
{
|
||||
color = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (color) return h2::parser::make_COLOR(std::string(++data, --len), loc_);
|
||||
@ -335,17 +335,17 @@ auto lexer::lex() -> xsk::gsc::h2::parser::symbol_type
|
||||
|
||||
if (key == keyword::KW_INVALID)
|
||||
throw h2::parser::syntax_error(loc_, utils::string::va("unknown preprocessor directive ('%s')", "#"));
|
||||
|
||||
|
||||
if (keyword_is_token(key))
|
||||
return keyword_token(key);
|
||||
|
||||
// call preprocessor(key);
|
||||
// call preprocessor(key);
|
||||
}
|
||||
continue;
|
||||
case '*':
|
||||
if (reader_.state == reader::end || (curr != '/' && curr != '='))
|
||||
return h2::parser::make_MUL(loc_);
|
||||
|
||||
|
||||
reader_.advance();
|
||||
|
||||
if (curr == '/')
|
||||
@ -399,24 +399,24 @@ auto lexer::lex() -> xsk::gsc::h2::parser::symbol_type
|
||||
if (curr != '=')
|
||||
return h2::parser::make_MOD(loc_);
|
||||
reader_.advance();
|
||||
return h2::parser::make_ASSIGN_MOD(loc_);
|
||||
return h2::parser::make_ASSIGN_MOD(loc_);
|
||||
case '|':
|
||||
if (curr != '|' && curr != '=')
|
||||
return h2::parser::make_BITWISE_OR(loc_);
|
||||
reader_.advance();
|
||||
return (last == '|') ? h2::parser::make_OR(loc_) : h2::parser::make_ASSIGN_BW_OR(loc_);
|
||||
return (last == '|') ? h2::parser::make_OR(loc_) : h2::parser::make_ASSIGN_BW_OR(loc_);
|
||||
case '&':
|
||||
if (curr != '&' && curr != '=' && curr != '"' && curr != '\'')
|
||||
return h2::parser::make_BITWISE_AND(loc_);
|
||||
reader_.advance();
|
||||
if (last == '"' || last == '\'')
|
||||
return read_string(last, true);
|
||||
return (last == '&') ? h2::parser::make_AND(loc_) : h2::parser::make_ASSIGN_BW_AND(loc_);
|
||||
return (last == '&') ? h2::parser::make_AND(loc_) : h2::parser::make_ASSIGN_BW_AND(loc_);
|
||||
case '^':
|
||||
if (curr != '=')
|
||||
return h2::parser::make_BITWISE_EXOR(loc_);
|
||||
reader_.advance();
|
||||
return h2::parser::make_ASSIGN_BW_EXOR(loc_);
|
||||
return h2::parser::make_ASSIGN_BW_EXOR(loc_);
|
||||
case '!':
|
||||
if (curr != '=')
|
||||
return h2::parser::make_NOT(loc_);
|
||||
|
@ -1827,7 +1827,7 @@ void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt)
|
||||
{
|
||||
decompile_loop(stmt, i, j);
|
||||
i = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -324,7 +324,7 @@ auto lexer::lex() -> xsk::gsc::iw5::parser::symbol_type
|
||||
{
|
||||
color = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (color) return iw5::parser::make_COLOR(std::string(++data, --len), loc_);
|
||||
@ -334,17 +334,17 @@ auto lexer::lex() -> xsk::gsc::iw5::parser::symbol_type
|
||||
|
||||
if (key == keyword::KW_INVALID)
|
||||
throw iw5::parser::syntax_error(loc_, utils::string::va("unknown preprocessor directive ('%s')", "#"));
|
||||
|
||||
|
||||
if (keyword_is_token(key))
|
||||
return keyword_token(key);
|
||||
|
||||
// call preprocessor(key);
|
||||
// call preprocessor(key);
|
||||
}
|
||||
continue;
|
||||
case '*':
|
||||
if (reader_.state == reader::end || (curr != '/' && curr != '='))
|
||||
return iw5::parser::make_MUL(loc_);
|
||||
|
||||
|
||||
reader_.advance();
|
||||
|
||||
if (curr == '/')
|
||||
@ -398,24 +398,24 @@ auto lexer::lex() -> xsk::gsc::iw5::parser::symbol_type
|
||||
if (curr != '=')
|
||||
return iw5::parser::make_MOD(loc_);
|
||||
reader_.advance();
|
||||
return iw5::parser::make_ASSIGN_MOD(loc_);
|
||||
return iw5::parser::make_ASSIGN_MOD(loc_);
|
||||
case '|':
|
||||
if (curr != '|' && curr != '=')
|
||||
return iw5::parser::make_BITWISE_OR(loc_);
|
||||
reader_.advance();
|
||||
return (last == '|') ? iw5::parser::make_OR(loc_) : iw5::parser::make_ASSIGN_BW_OR(loc_);
|
||||
return (last == '|') ? iw5::parser::make_OR(loc_) : iw5::parser::make_ASSIGN_BW_OR(loc_);
|
||||
case '&':
|
||||
if (curr != '&' && curr != '=' && curr != '"' && curr != '\'')
|
||||
return iw5::parser::make_BITWISE_AND(loc_);
|
||||
reader_.advance();
|
||||
if (last == '"' || last == '\'')
|
||||
return read_string(last, true);
|
||||
return (last == '&') ? iw5::parser::make_AND(loc_) : iw5::parser::make_ASSIGN_BW_AND(loc_);
|
||||
return (last == '&') ? iw5::parser::make_AND(loc_) : iw5::parser::make_ASSIGN_BW_AND(loc_);
|
||||
case '^':
|
||||
if (curr != '=')
|
||||
return iw5::parser::make_BITWISE_EXOR(loc_);
|
||||
reader_.advance();
|
||||
return iw5::parser::make_ASSIGN_BW_EXOR(loc_);
|
||||
return iw5::parser::make_ASSIGN_BW_EXOR(loc_);
|
||||
case '!':
|
||||
if (curr != '=')
|
||||
return iw5::parser::make_NOT(loc_);
|
||||
|
@ -1827,7 +1827,7 @@ void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt)
|
||||
{
|
||||
decompile_loop(stmt, i, j);
|
||||
i = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -324,7 +324,7 @@ auto lexer::lex() -> xsk::gsc::iw6::parser::symbol_type
|
||||
{
|
||||
color = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (color) return iw6::parser::make_COLOR(std::string(++data, --len), loc_);
|
||||
@ -334,17 +334,17 @@ auto lexer::lex() -> xsk::gsc::iw6::parser::symbol_type
|
||||
|
||||
if (key == keyword::KW_INVALID)
|
||||
throw iw6::parser::syntax_error(loc_, utils::string::va("unknown preprocessor directive ('%s')", "#"));
|
||||
|
||||
|
||||
if (keyword_is_token(key))
|
||||
return keyword_token(key);
|
||||
|
||||
// call preprocessor(key);
|
||||
// call preprocessor(key);
|
||||
}
|
||||
continue;
|
||||
case '*':
|
||||
if (reader_.state == reader::end || (curr != '/' && curr != '='))
|
||||
return iw6::parser::make_MUL(loc_);
|
||||
|
||||
|
||||
reader_.advance();
|
||||
|
||||
if (curr == '/')
|
||||
@ -398,24 +398,24 @@ auto lexer::lex() -> xsk::gsc::iw6::parser::symbol_type
|
||||
if (curr != '=')
|
||||
return iw6::parser::make_MOD(loc_);
|
||||
reader_.advance();
|
||||
return iw6::parser::make_ASSIGN_MOD(loc_);
|
||||
return iw6::parser::make_ASSIGN_MOD(loc_);
|
||||
case '|':
|
||||
if (curr != '|' && curr != '=')
|
||||
return iw6::parser::make_BITWISE_OR(loc_);
|
||||
reader_.advance();
|
||||
return (last == '|') ? iw6::parser::make_OR(loc_) : iw6::parser::make_ASSIGN_BW_OR(loc_);
|
||||
return (last == '|') ? iw6::parser::make_OR(loc_) : iw6::parser::make_ASSIGN_BW_OR(loc_);
|
||||
case '&':
|
||||
if (curr != '&' && curr != '=' && curr != '"' && curr != '\'')
|
||||
return iw6::parser::make_BITWISE_AND(loc_);
|
||||
reader_.advance();
|
||||
if (last == '"' || last == '\'')
|
||||
return read_string(last, true);
|
||||
return (last == '&') ? iw6::parser::make_AND(loc_) : iw6::parser::make_ASSIGN_BW_AND(loc_);
|
||||
return (last == '&') ? iw6::parser::make_AND(loc_) : iw6::parser::make_ASSIGN_BW_AND(loc_);
|
||||
case '^':
|
||||
if (curr != '=')
|
||||
return iw6::parser::make_BITWISE_EXOR(loc_);
|
||||
reader_.advance();
|
||||
return iw6::parser::make_ASSIGN_BW_EXOR(loc_);
|
||||
return iw6::parser::make_ASSIGN_BW_EXOR(loc_);
|
||||
case '!':
|
||||
if (curr != '=')
|
||||
return iw6::parser::make_NOT(loc_);
|
||||
|
@ -1827,7 +1827,7 @@ void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt)
|
||||
{
|
||||
decompile_loop(stmt, i, j);
|
||||
i = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -324,7 +324,7 @@ auto lexer::lex() -> xsk::gsc::iw7::parser::symbol_type
|
||||
{
|
||||
color = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (color) return iw7::parser::make_COLOR(std::string(++data, --len), loc_);
|
||||
@ -334,17 +334,17 @@ auto lexer::lex() -> xsk::gsc::iw7::parser::symbol_type
|
||||
|
||||
if (key == keyword::KW_INVALID)
|
||||
throw iw7::parser::syntax_error(loc_, utils::string::va("unknown preprocessor directive ('%s')", "#"));
|
||||
|
||||
|
||||
if (keyword_is_token(key))
|
||||
return keyword_token(key);
|
||||
|
||||
// call preprocessor(key);
|
||||
// call preprocessor(key);
|
||||
}
|
||||
continue;
|
||||
case '*':
|
||||
if (reader_.state == reader::end || (curr != '/' && curr != '='))
|
||||
return iw7::parser::make_MUL(loc_);
|
||||
|
||||
|
||||
reader_.advance();
|
||||
|
||||
if (curr == '/')
|
||||
@ -398,24 +398,24 @@ auto lexer::lex() -> xsk::gsc::iw7::parser::symbol_type
|
||||
if (curr != '=')
|
||||
return iw7::parser::make_MOD(loc_);
|
||||
reader_.advance();
|
||||
return iw7::parser::make_ASSIGN_MOD(loc_);
|
||||
return iw7::parser::make_ASSIGN_MOD(loc_);
|
||||
case '|':
|
||||
if (curr != '|' && curr != '=')
|
||||
return iw7::parser::make_BITWISE_OR(loc_);
|
||||
reader_.advance();
|
||||
return (last == '|') ? iw7::parser::make_OR(loc_) : iw7::parser::make_ASSIGN_BW_OR(loc_);
|
||||
return (last == '|') ? iw7::parser::make_OR(loc_) : iw7::parser::make_ASSIGN_BW_OR(loc_);
|
||||
case '&':
|
||||
if (curr != '&' && curr != '=' && curr != '"' && curr != '\'')
|
||||
return iw7::parser::make_BITWISE_AND(loc_);
|
||||
reader_.advance();
|
||||
if (last == '"' || last == '\'')
|
||||
return read_string(last, true);
|
||||
return (last == '&') ? iw7::parser::make_AND(loc_) : iw7::parser::make_ASSIGN_BW_AND(loc_);
|
||||
return (last == '&') ? iw7::parser::make_AND(loc_) : iw7::parser::make_ASSIGN_BW_AND(loc_);
|
||||
case '^':
|
||||
if (curr != '=')
|
||||
return iw7::parser::make_BITWISE_EXOR(loc_);
|
||||
reader_.advance();
|
||||
return iw7::parser::make_ASSIGN_BW_EXOR(loc_);
|
||||
return iw7::parser::make_ASSIGN_BW_EXOR(loc_);
|
||||
case '!':
|
||||
if (curr != '=')
|
||||
return iw7::parser::make_NOT(loc_);
|
||||
|
@ -1864,7 +1864,7 @@ void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt)
|
||||
{
|
||||
decompile_loop(stmt, i, j);
|
||||
i = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -327,7 +327,7 @@ auto lexer::lex() -> xsk::gsc::iw8::parser::symbol_type
|
||||
{
|
||||
color = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (color) return iw8::parser::make_COLOR(std::string(++data, --len), loc_);
|
||||
@ -337,17 +337,17 @@ auto lexer::lex() -> xsk::gsc::iw8::parser::symbol_type
|
||||
|
||||
if (key == keyword::KW_INVALID)
|
||||
throw iw8::parser::syntax_error(loc_, utils::string::va("unknown preprocessor directive ('%s')", "#"));
|
||||
|
||||
|
||||
if (keyword_is_token(key))
|
||||
return keyword_token(key);
|
||||
|
||||
// call preprocessor(key);
|
||||
// call preprocessor(key);
|
||||
}
|
||||
continue;
|
||||
case '*':
|
||||
if (reader_.state == reader::end || (curr != '/' && curr != '='))
|
||||
return iw8::parser::make_MUL(loc_);
|
||||
|
||||
|
||||
reader_.advance();
|
||||
|
||||
if (curr == '/')
|
||||
@ -401,24 +401,24 @@ auto lexer::lex() -> xsk::gsc::iw8::parser::symbol_type
|
||||
if (curr != '=')
|
||||
return iw8::parser::make_MOD(loc_);
|
||||
reader_.advance();
|
||||
return iw8::parser::make_ASSIGN_MOD(loc_);
|
||||
return iw8::parser::make_ASSIGN_MOD(loc_);
|
||||
case '|':
|
||||
if (curr != '|' && curr != '=')
|
||||
return iw8::parser::make_BITWISE_OR(loc_);
|
||||
reader_.advance();
|
||||
return (last == '|') ? iw8::parser::make_OR(loc_) : iw8::parser::make_ASSIGN_BW_OR(loc_);
|
||||
return (last == '|') ? iw8::parser::make_OR(loc_) : iw8::parser::make_ASSIGN_BW_OR(loc_);
|
||||
case '&':
|
||||
if (curr != '&' && curr != '=' && curr != '"' && curr != '\'')
|
||||
return iw8::parser::make_BITWISE_AND(loc_);
|
||||
reader_.advance();
|
||||
if (last == '"' || last == '\'')
|
||||
return read_string(last, true);
|
||||
return (last == '&') ? iw8::parser::make_AND(loc_) : iw8::parser::make_ASSIGN_BW_AND(loc_);
|
||||
return (last == '&') ? iw8::parser::make_AND(loc_) : iw8::parser::make_ASSIGN_BW_AND(loc_);
|
||||
case '^':
|
||||
if (curr != '=')
|
||||
return iw8::parser::make_BITWISE_EXOR(loc_);
|
||||
reader_.advance();
|
||||
return iw8::parser::make_ASSIGN_BW_EXOR(loc_);
|
||||
return iw8::parser::make_ASSIGN_BW_EXOR(loc_);
|
||||
case '!':
|
||||
if (curr != '=')
|
||||
return iw8::parser::make_NOT(loc_);
|
||||
|
@ -1833,7 +1833,7 @@ void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt)
|
||||
{
|
||||
decompile_loop(stmt, i, j);
|
||||
i = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -325,7 +325,7 @@ auto lexer::lex() -> xsk::gsc::s1::parser::symbol_type
|
||||
{
|
||||
color = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (color) return s1::parser::make_COLOR(std::string(++data, --len), loc_);
|
||||
@ -335,17 +335,17 @@ auto lexer::lex() -> xsk::gsc::s1::parser::symbol_type
|
||||
|
||||
if (key == keyword::KW_INVALID)
|
||||
throw s1::parser::syntax_error(loc_, utils::string::va("unknown preprocessor directive ('%s')", "#"));
|
||||
|
||||
|
||||
if (keyword_is_token(key))
|
||||
return keyword_token(key);
|
||||
|
||||
// call preprocessor(key);
|
||||
// call preprocessor(key);
|
||||
}
|
||||
continue;
|
||||
case '*':
|
||||
if (reader_.state == reader::end || (curr != '/' && curr != '='))
|
||||
return s1::parser::make_MUL(loc_);
|
||||
|
||||
|
||||
reader_.advance();
|
||||
|
||||
if (curr == '/')
|
||||
@ -399,24 +399,24 @@ auto lexer::lex() -> xsk::gsc::s1::parser::symbol_type
|
||||
if (curr != '=')
|
||||
return s1::parser::make_MOD(loc_);
|
||||
reader_.advance();
|
||||
return s1::parser::make_ASSIGN_MOD(loc_);
|
||||
return s1::parser::make_ASSIGN_MOD(loc_);
|
||||
case '|':
|
||||
if (curr != '|' && curr != '=')
|
||||
return s1::parser::make_BITWISE_OR(loc_);
|
||||
reader_.advance();
|
||||
return (last == '|') ? s1::parser::make_OR(loc_) : s1::parser::make_ASSIGN_BW_OR(loc_);
|
||||
return (last == '|') ? s1::parser::make_OR(loc_) : s1::parser::make_ASSIGN_BW_OR(loc_);
|
||||
case '&':
|
||||
if (curr != '&' && curr != '=' && curr != '"' && curr != '\'')
|
||||
return s1::parser::make_BITWISE_AND(loc_);
|
||||
reader_.advance();
|
||||
if (last == '"' || last == '\'')
|
||||
return read_string(last, true);
|
||||
return (last == '&') ? s1::parser::make_AND(loc_) : s1::parser::make_ASSIGN_BW_AND(loc_);
|
||||
return (last == '&') ? s1::parser::make_AND(loc_) : s1::parser::make_ASSIGN_BW_AND(loc_);
|
||||
case '^':
|
||||
if (curr != '=')
|
||||
return s1::parser::make_BITWISE_EXOR(loc_);
|
||||
reader_.advance();
|
||||
return s1::parser::make_ASSIGN_BW_EXOR(loc_);
|
||||
return s1::parser::make_ASSIGN_BW_EXOR(loc_);
|
||||
case '!':
|
||||
if (curr != '=')
|
||||
return s1::parser::make_NOT(loc_);
|
||||
|
@ -1840,7 +1840,7 @@ void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt)
|
||||
{
|
||||
decompile_loop(stmt, i, j);
|
||||
i = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -325,7 +325,7 @@ auto lexer::lex() -> xsk::gsc::s2::parser::symbol_type
|
||||
{
|
||||
color = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (color) return s2::parser::make_COLOR(std::string(++data, --len), loc_);
|
||||
@ -335,17 +335,17 @@ auto lexer::lex() -> xsk::gsc::s2::parser::symbol_type
|
||||
|
||||
if (key == keyword::KW_INVALID)
|
||||
throw s2::parser::syntax_error(loc_, utils::string::va("unknown preprocessor directive ('%s')", "#"));
|
||||
|
||||
|
||||
if (keyword_is_token(key))
|
||||
return keyword_token(key);
|
||||
|
||||
// call preprocessor(key);
|
||||
// call preprocessor(key);
|
||||
}
|
||||
continue;
|
||||
case '*':
|
||||
if (reader_.state == reader::end || (curr != '/' && curr != '='))
|
||||
return s2::parser::make_MUL(loc_);
|
||||
|
||||
|
||||
reader_.advance();
|
||||
|
||||
if (curr == '/')
|
||||
@ -399,24 +399,24 @@ auto lexer::lex() -> xsk::gsc::s2::parser::symbol_type
|
||||
if (curr != '=')
|
||||
return s2::parser::make_MOD(loc_);
|
||||
reader_.advance();
|
||||
return s2::parser::make_ASSIGN_MOD(loc_);
|
||||
return s2::parser::make_ASSIGN_MOD(loc_);
|
||||
case '|':
|
||||
if (curr != '|' && curr != '=')
|
||||
return s2::parser::make_BITWISE_OR(loc_);
|
||||
reader_.advance();
|
||||
return (last == '|') ? s2::parser::make_OR(loc_) : s2::parser::make_ASSIGN_BW_OR(loc_);
|
||||
return (last == '|') ? s2::parser::make_OR(loc_) : s2::parser::make_ASSIGN_BW_OR(loc_);
|
||||
case '&':
|
||||
if (curr != '&' && curr != '=' && curr != '"' && curr != '\'')
|
||||
return s2::parser::make_BITWISE_AND(loc_);
|
||||
reader_.advance();
|
||||
if (last == '"' || last == '\'')
|
||||
return read_string(last, true);
|
||||
return (last == '&') ? s2::parser::make_AND(loc_) : s2::parser::make_ASSIGN_BW_AND(loc_);
|
||||
return (last == '&') ? s2::parser::make_AND(loc_) : s2::parser::make_ASSIGN_BW_AND(loc_);
|
||||
case '^':
|
||||
if (curr != '=')
|
||||
return s2::parser::make_BITWISE_EXOR(loc_);
|
||||
reader_.advance();
|
||||
return s2::parser::make_ASSIGN_BW_EXOR(loc_);
|
||||
return s2::parser::make_ASSIGN_BW_EXOR(loc_);
|
||||
case '!':
|
||||
if (curr != '=')
|
||||
return s2::parser::make_NOT(loc_);
|
||||
|
@ -1864,7 +1864,7 @@ void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt)
|
||||
{
|
||||
decompile_loop(stmt, i, j);
|
||||
i = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -327,7 +327,7 @@ auto lexer::lex() -> xsk::gsc::s4::parser::symbol_type
|
||||
{
|
||||
color = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (color) return s4::parser::make_COLOR(std::string(++data, --len), loc_);
|
||||
@ -337,17 +337,17 @@ auto lexer::lex() -> xsk::gsc::s4::parser::symbol_type
|
||||
|
||||
if (key == keyword::KW_INVALID)
|
||||
throw s4::parser::syntax_error(loc_, utils::string::va("unknown preprocessor directive ('%s')", "#"));
|
||||
|
||||
|
||||
if (keyword_is_token(key))
|
||||
return keyword_token(key);
|
||||
|
||||
// call preprocessor(key);
|
||||
// call preprocessor(key);
|
||||
}
|
||||
continue;
|
||||
case '*':
|
||||
if (reader_.state == reader::end || (curr != '/' && curr != '='))
|
||||
return s4::parser::make_MUL(loc_);
|
||||
|
||||
|
||||
reader_.advance();
|
||||
|
||||
if (curr == '/')
|
||||
@ -401,24 +401,24 @@ auto lexer::lex() -> xsk::gsc::s4::parser::symbol_type
|
||||
if (curr != '=')
|
||||
return s4::parser::make_MOD(loc_);
|
||||
reader_.advance();
|
||||
return s4::parser::make_ASSIGN_MOD(loc_);
|
||||
return s4::parser::make_ASSIGN_MOD(loc_);
|
||||
case '|':
|
||||
if (curr != '|' && curr != '=')
|
||||
return s4::parser::make_BITWISE_OR(loc_);
|
||||
reader_.advance();
|
||||
return (last == '|') ? s4::parser::make_OR(loc_) : s4::parser::make_ASSIGN_BW_OR(loc_);
|
||||
return (last == '|') ? s4::parser::make_OR(loc_) : s4::parser::make_ASSIGN_BW_OR(loc_);
|
||||
case '&':
|
||||
if (curr != '&' && curr != '=' && curr != '"' && curr != '\'')
|
||||
return s4::parser::make_BITWISE_AND(loc_);
|
||||
reader_.advance();
|
||||
if (last == '"' || last == '\'')
|
||||
return read_string(last, true);
|
||||
return (last == '&') ? s4::parser::make_AND(loc_) : s4::parser::make_ASSIGN_BW_AND(loc_);
|
||||
return (last == '&') ? s4::parser::make_AND(loc_) : s4::parser::make_ASSIGN_BW_AND(loc_);
|
||||
case '^':
|
||||
if (curr != '=')
|
||||
return s4::parser::make_BITWISE_EXOR(loc_);
|
||||
reader_.advance();
|
||||
return s4::parser::make_ASSIGN_BW_EXOR(loc_);
|
||||
return s4::parser::make_ASSIGN_BW_EXOR(loc_);
|
||||
case '!':
|
||||
if (curr != '=')
|
||||
return s4::parser::make_NOT(loc_);
|
||||
|
Loading…
Reference in New Issue
Block a user