Comments (3)
This seems to be the expected result.
When the following command is executed,
$ sh -c "echo 'print(' | swift -"
The following output is obtained. This output matches the SwiftFiddle output.
<stdin>:2:1: error: expected expression in list of expressions
^
The same results are obtained when the following Swift file (test.swift) is created,
print(
and the following command is executed.
$ swift test.swift
from swiftfiddle-web.
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.
from swiftfiddle-web.
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.
from swiftfiddle-web.
Related Issues (20)
- UX issue - share button tries to walk off the screen HOT 1
- Support Swift V5.8.1 HOT 1
- Laggy Editor HOT 6
- Support Swift V5.9 HOT 1
- Maximum execution time of 60 seconds exceeded.
- Maximum execution time of 60 seconds exceeded. HOT 1
- Swift 5.9 - run error HOT 1
- Support Swift V5.9.1
- There is a significant time gap between requests for different Swift versions. HOT 2
- Critical Bug HOT 1
- Bug in output HOT 1
- 502 Bad Gateway HOT 1
- Long execution time when sending a POST request using Swift HOT 1
- error: no such module 'SwiftUI' HOT 2
- 'docker: invalid reference format' when >= Nightly-5.7 HOT 1
- Run an asynchronous task HOT 1
- Confidentiality maybe
- SSL certificate for swiftfiddle.com expired a few days ago HOT 1
- No response if "_streaming" is false
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiftfiddle-web.