@@ -128,21 +128,20 @@ void Parser::fetchSourceLocationFromComment()
128
128
auto const end = toInt (matchResult[4 ].str ());
129
129
130
130
auto const commentLocation = m_scanner->currentCommentLocation ();
131
- m_locationOverride = SourceLocation{} ;
131
+ m_debugDataOverride = DebugData::create () ;
132
132
if (!sourceIndex || !start || !end)
133
133
m_errorReporter.syntaxError (6367_error, commentLocation, " Invalid value in source location mapping. Could not parse location specification." );
134
134
else if (!((*start < 0 && *end < 0 ) || (*start >= 0 && *start <= *end)))
135
135
m_errorReporter.syntaxError (5798_error, commentLocation, " Invalid value in source location mapping. Start offset larger than end offset." );
136
136
else if (sourceIndex == -1 && (0 <= *start && *start <= *end)) // Use source index -1 to indicate original source.
137
- m_locationOverride = SourceLocation{*start, *end, ParserBase::currentLocation ().source };
137
+ m_debugDataOverride = DebugData::create ( SourceLocation{*start, *end, ParserBase::currentLocation ().source }) ;
138
138
else if (!(sourceIndex >= 0 && m_charStreamMap->count (static_cast <unsigned >(*sourceIndex))))
139
139
m_errorReporter.syntaxError (2674_error, commentLocation, " Invalid source mapping. Source index not defined via @use-src." );
140
140
else
141
141
{
142
142
shared_ptr<CharStream> charStream = m_charStreamMap->at (static_cast <unsigned >(*sourceIndex));
143
143
solAssert (charStream, " " );
144
-
145
- m_locationOverride = SourceLocation{*start, *end, charStream};
144
+ m_debugDataOverride = DebugData::create (SourceLocation{*start, *end, charStream});
146
145
}
147
146
}
148
147
}
@@ -371,7 +370,7 @@ variant<Literal, Identifier> Parser::parseLiteralOrIdentifier()
371
370
{
372
371
case Token::Identifier:
373
372
{
374
- Identifier identifier{DebugData::create ( currentLocation () ), YulString{currentLiteral ()}};
373
+ Identifier identifier{createDebugData ( ), YulString{currentLiteral ()}};
375
374
advance ();
376
375
return identifier;
377
376
}
@@ -402,7 +401,7 @@ variant<Literal, Identifier> Parser::parseLiteralOrIdentifier()
402
401
}
403
402
404
403
Literal literal{
405
- DebugData::create ( currentLocation () ),
404
+ createDebugData ( ),
406
405
kind,
407
406
YulString{currentLiteral ()},
408
407
kind == LiteralKind::Boolean ? m_dialect.boolType : m_dialect.defaultType
0 commit comments