在python中,我可以运行脚本并在该脚本的上下文中进入交互模式.这让我搞乱全局变量以及不检查程序状态的东西.
$ python -i hello.py
Run Code Online (Sandbox Code Playgroud)
我可以用Coffeescript做到这一点吗?我尝试过以下方法:
$ coffee -i hello.coffee
Run Code Online (Sandbox Code Playgroud)
不加载hello.coffee.它相当于咖啡-i
$ cat hello.coffee | coffee -i
Run Code Online (Sandbox Code Playgroud)
在REPL中逐行运行脚本,但在EOF之后结束REPL.
我在自定义语法文件中有这些规则.
syn match id '\w\+'
syn keyword _type void int bool string list nextgroup=id
Run Code Online (Sandbox Code Playgroud)
我只想id
在一个之后匹配_type
.