summaryrefslogtreecommitdiffhomepage
path: root/asm
diff options
context:
space:
mode:
Diffstat (limited to 'asm')
-rw-r--r--asm/parse.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/asm/parse.cpp b/asm/parse.cpp
index 3b6e6be..e62f585 100644
--- a/asm/parse.cpp
+++ b/asm/parse.cpp
@@ -35,7 +35,7 @@ namespace {
// skip optional whitespace
void parseWhitespace(const std::string& asm_code, size_t& pos) {
- std::regex re_whitespace("( \\t)+", std::regex_constants::ECMAScript);
+ std::regex re_whitespace("[ \\t]+", std::regex_constants::ECMAScript);
std::smatch match;
if (std::regex_search(asm_code.cbegin() + pos, asm_code.cend(), match, re_whitespace, std::regex_constants::match_continuous)) {
@@ -191,7 +191,7 @@ namespace {
void parseComment(const std::string& asm_code, size_t& pos) {
parseWhitespace(asm_code, pos);
- std::regex re_comment("(#|//).*", std::regex_constants::ECMAScript);
+ std::regex re_comment("(;|//).*", std::regex_constants::ECMAScript);
std::smatch match;
if (std::regex_search(asm_code.cbegin() + pos, asm_code.cend(), match, re_comment, std::regex_constants::match_continuous)) {