Skip to content

Commit d515278

Browse files
committed
[Heavy] Fix error location with missing quote syntax
1 parent 3b7edbc commit d515278

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

heavy/lib/Parser.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,10 @@ ValueResult Parser::ParseExprAbbrev(Token const& StartTok, char const* Name) {
226226
ValueResult Result = ParseExpr(StartTok);
227227
if (!Result.isUsable()) return Result;
228228

229-
Value S = Context.CreateSymbol(Name, Abbrev.getLocation());
230-
Value P = Context.CreatePair(S, Context.CreatePair(Result.get()));
229+
heavy::SourceLocation Loc = Abbrev.getLocation();
230+
Value S = Context.CreateSymbol(Name, Loc);
231+
Value P = Context.CreatePairWithSource(
232+
S, Context.CreatePair(Result.get()), Loc);
231233
return P;
232234
}
233235

0 commit comments

Comments
 (0)