diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-04-15 18:39:37 +0630 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-04-15 18:39:37 +0630 |
commit | 1e7f1bdee91324613a1675642775d6ed32d7e94d (patch) | |
tree | 78733fc657c0bafbd959a7c05dbe9af3c3c1c633 /asm/lexer.cpp | |
parent | ba3525d53311dfc89610748ef3ce0a8d9e3756b9 (diff) | |
download | ovm-1e7f1bdee91324613a1675642775d6ed32d7e94d.tar.gz ovm-1e7f1bdee91324613a1675642775d6ed32d7e94d.tar.bz2 ovm-1e7f1bdee91324613a1675642775d6ed32d7e94d.zip |
Changed %const format in preprocesser now
Instead of %const(<name>) ... %end it will now be %const <name>
... %end i.e. the first symbol after %const will be considered the
name of the constant similar to %use.
Diffstat (limited to 'asm/lexer.cpp')
-rw-r--r-- | asm/lexer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/asm/lexer.cpp b/asm/lexer.cpp index caa1327..991e551 100644 --- a/asm/lexer.cpp +++ b/asm/lexer.cpp @@ -25,7 +25,7 @@ static_assert(NUMBER_OF_OPCODES == 98, "ERROR: Lexer is out of date"); using std::string, std::string_view, std::pair, std::make_pair; const auto VALID_SYMBOL = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUV" - "WXYZ0123456789-_.:()%#$", + "WXYZ0123456789-_.:%#$", VALID_DIGIT = "0123456789", VALID_HEX = "0123456789abcdefABCDEF"; bool is_char_in_s(char c, const char *s) @@ -52,7 +52,7 @@ pair<token_t, lerr_t> tokenise_symbol(string_view &source, size_t &column, if (initial_match(sym, "%CONST")) { - t = token_t(token_type_t::PP_CONST, sym.substr(6)); + t.type = token_type_t::PP_CONST; } else if (sym == "%USE") { |