summaryrefslogtreecommitdiff
path: root/src/macro_rules/parse.cpp
diff options
context:
space:
mode:
authorJohn Hodge (bugs) <tpg@mutabah.net>2017-07-06 17:41:10 +0800
committerJohn Hodge (bugs) <tpg@mutabah.net>2017-07-06 17:41:10 +0800
commit48e2c4973d5401c9f7d0ee2bac22ac6015744961 (patch)
treeb93fb21b85343633e2d0c00c42ea7a388bb6f883 /src/macro_rules/parse.cpp
parentce3d36a90b9efd11c94f9084b5e727d65b6509a7 (diff)
parentc4e88b3c49736e71534c918a83956885c052beb8 (diff)
downloadmrust-48e2c4973d5401c9f7d0ee2bac22ac6015744961.tar.gz
Merge branch 'master' of https://github.com/thepowersgang/mrustc
# Conflicts: # src/trans/codegen_c.cpp
Diffstat (limited to 'src/macro_rules/parse.cpp')
-rw-r--r--src/macro_rules/parse.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/macro_rules/parse.cpp b/src/macro_rules/parse.cpp
index 8264180f..1b7509fd 100644
--- a/src/macro_rules/parse.cpp
+++ b/src/macro_rules/parse.cpp
@@ -82,7 +82,7 @@ public:
else if( type == "item" )
ret.push_back( MacroPatEnt(name, idx, MacroPatEnt::PAT_ITEM) );
else
- ERROR(lex.getPosition(), E0000, "Unknown fragment type '" << type << "'");
+ ERROR(lex.point_span(), E0000, "Unknown fragment type '" << type << "'");
break; }
case TOK_PAREN_OPEN: {
auto subpat = Parse_MacroRules_Pat(lex, TOK_PAREN_OPEN, TOK_PAREN_CLOSE, names);
@@ -155,7 +155,7 @@ public:
{
DEBUG("depth--");
if(depth == 0)
- ERROR(lex.getPosition(), E0000, "Unmatched " << Token(close) << " in macro content");
+ ERROR(lex.point_span(), E0000, "Unmatched " << Token(close) << " in macro content");
depth --;
}
@@ -206,7 +206,7 @@ public:
auto name = tok.type() == TOK_IDENT ? tok.str() : FMT(tok);
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");
+ ERROR(lex.point_span(), E0000, "Macro variable $" << name << " not found");
if( var_set_ptr ) {
var_set_ptr->insert( ::std::make_pair(idx,true) );
}