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
Linux ubuntu 15
Swift version 3.0-dev (LLVM b361b0fc05, Clang 11493b0f62, Swift 24a0c3d)
Additional Detail from JIRA
Votes
3
Component/s
LLDB for Swift
Labels
Bug, REPL
Assignee
None
Priority
Medium
md5: 2215125dbc4176bab8cc45b90b06d4ca
Issue Description:
To reproduce:
In test.swift:
/*hello world*/print("hello world")
Run:
cattest.swift | swift
Output:
WelcometoSwiftversion3.0-dev (LLVMb361b0fc05, Clang11493b0f62, Swift24a0c3de75). Type :helpforassistance.
<REPL>:3:6: error: unterminated'/*'comment
#line
^
*/
<REPL>:2:1: note: commentstartedhere/*^repl.swift:1:6: error: consecutive statements on a line must be separated by ';'hello world ^ ;<REPL>:2:1: error: unexpected end of block comment*/
^
helloworld
Notice the errors about the comment.
The reason I'm piping into the REPL is because I use it programmatically (As a child process from another program) and that means it's not in TTY mode. Everything else work (including multiline code).
The text was updated successfully, but these errors were encountered:
As briefly mentioned in the description: I'm using the REPL programmatically, I'm starting the process from my program and writing code through stdin to it and parsing the output. This is because I'm adding support for swift it on my online REPL website: https://repl.it
So I need this to be interactive and stateful. The script interpreter exits after it finishes running the current script.
Let me know if there is a better way of doing this. It works pretty well, and I'm hacking around this issue by stripping multiline comments.
Environment
Linux ubuntu 15
Swift version 3.0-dev (LLVM b361b0fc05, Clang 11493b0f62, Swift 24a0c3d)
Additional Detail from JIRA
md5: 2215125dbc4176bab8cc45b90b06d4ca
Issue Description:
To reproduce:
In test.swift:
Run:
Output:
Notice the errors about the comment.
The reason I'm piping into the REPL is because I use it programmatically (As a child process from another program) and that means it's not in TTY mode. Everything else work (including multiline code).
The text was updated successfully, but these errors were encountered: