diff --git a/Ast/src/Lexer.cpp b/Ast/src/Lexer.cpp index 94edd2aa..9c9d3d98 100644 --- a/Ast/src/Lexer.cpp +++ b/Ast/src/Lexer.cpp @@ -625,6 +625,7 @@ const Lexeme Lexer::nextInterpolatedString() incrementInterpolatedStringDepth(); lexeme = Lexeme(Location(start, position()), Lexeme::InterpStringMid, &buffer[startOffset], offset - startOffset); + consume(); return lexeme; default: diff --git a/tests/conformance/stringinterp.lua b/tests/conformance/stringinterp.lua index 665250a9..832a4257 100644 --- a/tests/conformance/stringinterp.lua +++ b/tests/conformance/stringinterp.lua @@ -11,7 +11,7 @@ assertEq(`hello {"world"}`, "hello world") assertEq(`2 + 2 = {2 + 2}`, "2 + 2 = 4") --- assertEq(`{1} {2} {3} {4} {5} {6} {7}`, "1 2 3 4 5 6 7") +assertEq(`{1} {2} {3} {4} {5} {6} {7}`, "1 2 3 4 5 6 7") -- local combo = {5, 2, 8, 9} -- assert(`The lock combinations are: {table.concat(combo, ", ")}` == "The lock combinations are: 5, 2, 8, 9")