diff options
author | John Hodge <tpg@mutabah.net> | 2016-11-02 19:38:45 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-11-02 19:38:45 +0800 |
commit | 983ff1c26e15a13e6a1e0e4bb1e964ec496a4777 (patch) | |
tree | bc39e1e44e63b9440dd186c2781e4ad02f82c2c5 /src/macro_rules/parse.cpp | |
parent | 739c2f5a2124e9aa4fcc01e8fc1dbfe147a37254 (diff) | |
download | mrust-983ff1c26e15a13e6a1e0e4bb1e964ec496a4777.tar.gz |
Parse - Rework hygiene (with spelling fix) for take 2
Diffstat (limited to 'src/macro_rules/parse.cpp')
-rw-r--r-- | src/macro_rules/parse.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/macro_rules/parse.cpp b/src/macro_rules/parse.cpp index bd54c67d..c7a6ef89 100644 --- a/src/macro_rules/parse.cpp +++ b/src/macro_rules/parse.cpp @@ -49,10 +49,10 @@ public: switch( GET_TOK(tok, lex) ) { case TOK_IDENT: { - ::std::string name = mv$(tok.ident_str()); + ::std::string name = mv$(tok.str()); GET_CHECK_TOK(tok, lex, TOK_COLON); GET_CHECK_TOK(tok, lex, TOK_IDENT); - ::std::string type = mv$(tok.ident_str()); + ::std::string type = mv$(tok.str()); unsigned int idx = ::std::find( names.begin(), names.end(), name ) - names.begin(); if( idx == names.size() ) @@ -202,7 +202,7 @@ public: else if( tok.type() == TOK_IDENT ) { // Look up the named parameter in the list of param names for this arm - const auto& name = tok.ident_str(); + const auto& name = tok.str(); unsigned int idx = ::std::find(var_names.begin(), var_names.end(), name) - var_names.begin(); if( idx == var_names.size() ) ERROR(lex.getPosition(), E0000, "Macro variable $" << name << " not found"); |