You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Oh, I see. I tested only on https://www.jdoodle.com/execute-swift-online/.
It makes sense that the problem isn't in a line that doesn't exist yet.
How can we highlight errors if the line doesn't exist? 🤔 I think Xcode adds an extra line for that.
Yes, Parser tries to find the closing bracket to the end of the file, so it will give an error for a line number that does not exist.
After the error is printed, you can add a line corresponding to the line number in error, for example, to get the expected result.
code:
print(
output: 2:1: error: expected expression in list of expressions
expected: 1:7: error: expected expression in list of expressions
The text was updated successfully, but these errors were encountered: