StarShip

所属分类:Swift编程
开发工具:Swift
文件大小:0KB
下载次数:0
上传日期:2020-01-12 10:11:17
上 传 者sh-1993
说明:  用Swift编写的解释的强类型函数式编程语言
(An interpreted, strongly typed, and functional programming language written in Swift)

文件列表:
Docs/ (0, 2020-01-11)
Docs/Architecture.md (2480, 2020-01-11)
Docs/StandardLibrary.md (1714, 2020-01-11)
Docs/Syntax.md (3041, 2020-01-11)
Examples/ (0, 2020-01-11)
Examples/Hello.strs (115, 2020-01-11)
Examples/SimpleHTML.strs (316, 2020-01-11)
LICENSE (1053, 2020-01-11)
StarShip.xcodeproj/ (0, 2020-01-11)
StarShip.xcodeproj/project.pbxproj (15615, 2020-01-11)
StarShip.xcodeproj/project.xcworkspace/ (0, 2020-01-11)
StarShip.xcodeproj/project.xcworkspace/contents.xcworkspacedata (153, 2020-01-11)
StarShip.xcodeproj/project.xcworkspace/xcshareddata/ (0, 2020-01-11)
StarShip.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (238, 2020-01-11)
StarShip.xcodeproj/xcuserdata/ (0, 2020-01-11)
StarShip.xcodeproj/xcuserdata/larsaugustin.xcuserdatad/ (0, 2020-01-11)
StarShip.xcodeproj/xcuserdata/larsaugustin.xcuserdatad/xcschemes/ (0, 2020-01-11)
StarShip.xcodeproj/xcuserdata/larsaugustin.xcuserdatad/xcschemes/xcschememanagement.plist (343, 2020-01-11)
StarShip/ (0, 2020-01-11)
StarShip/Sources/ (0, 2020-01-11)
StarShip/Sources/Execution/ (0, 2020-01-11)
StarShip/Sources/Execution/ExecHelpers.swift (3180, 2020-01-11)
StarShip/Sources/Execution/Execution.swift (20296, 2020-01-11)
StarShip/Sources/Execution/Instruction.swift (2012, 2020-01-11)
StarShip/Sources/Execution/StandardLibrary.swift (6352, 2020-01-11)
StarShip/Sources/Helpers/ (0, 2020-01-11)
StarShip/Sources/Helpers/Global.swift (2804, 2020-01-11)
StarShip/Sources/Lexer/ (0, 2020-01-11)
StarShip/Sources/Lexer/Lexer.swift (2766, 2020-01-11)
StarShip/Sources/Lexer/Token.swift (339, 2020-01-11)
StarShip/Sources/Parser/ (0, 2020-01-11)
StarShip/Sources/Parser/Parser.swift (10847, 2020-01-11)
StarShip/Sources/main.swift (1380, 2020-01-11)

# StarShip

Version: 0.1 Extension: .strs

StarShip is an interpreted, strongly typed, and functional programming language written in Swift. The project includes a lexer, parser, and interpreter. Since it's still in the early stages of development, it's pretty simple. Basic types like strings, booleans, and numbers are available. Arrays are planned, but not yet implemented. Even when fully developed, this language shouldn't be used in a production environment. It is intended for having fun while playing around with the syntax and demonstrating the architecture of a simple interpreter. *If you're interested in the architecture please read [this document](https://github.com/larsaugustin/StarShip/blob/master/Docs/Architecture.md)* ## Example The following code prints "hello world" ten times. ``` hello :: -> Bool "hello world" return True end let _ = for 10 hello ``` *The syntax is explained [here](https://github.com/larsaugustin/StarShip/blob/master/Docs/Syntax.md)* ## Features - Minimal, functional syntax - A strong type system - Basic types like bools, numbers, and strings - Function definitions with arguments and return types - Functions for conditional statements and repeated function calls - A standard library with basic operations for comparing and simple numerical operations ## Building and running the CLI Since StarShip doesn't use any dependencies, you *should* be able to open up the project in Xcode and create an archive by selecting "Archive" in the "Product" menu. You might have to change the default development team to your own one. If simply opening the project doesn't work, please open an issue. After exporting the binary, you can drag it into a terminal window to use it immediately or copy the binary to `/usr/local/bin/`. ## Roadmap - [ ] Arguments for if function - [ ] Arrays - [ ] Compile to C/JS or LLVM bitcode - [ ] Linux support - [ ] Automated unit tests ## IDE I'm currently in the process of writing a small IDE for writing and running StarShip code on macOS and iOS. The IDE will be completely portable (you won't need to have the CLI installed) and will (probably) be released on the App Store. ## License This project is released under the MIT license. See the `LICENSE` file for more info.

近期下载者

相关文件


收藏者