magoo

所属分类:编程语言基础
开发工具:Swift
文件大小:0KB
下载次数:0
上传日期:2022-11-14 22:32:24
上 传 者sh-1993
说明:  早期版本Carbon编程语言的解释器,Swift
(An interpreter for an early version of the Carbon programming language, in Swift)

文件列表:
DesignNotes.md (10731, 2021-06-15)
ImplementationNotes.md (11231, 2021-06-15)
LICENSE (13160, 2021-06-15)
Makefile (1460, 2021-06-15)
Package.resolved (317, 2021-06-15)
Package.swift (1278, 2021-06-15)
Sources/ (0, 2021-06-15)
Sources/AST.swift (14401, 2021-06-15)
Sources/ASTDictionary.swift (860, 2021-06-15)
Sources/CarbonError.swift (2130, 2021-06-15)
Sources/ExecutableProgram.swift (3063, 2021-06-15)
Sources/Interpreter.swift (37221, 2021-06-15)
Sources/Memo.swift (572, 2021-06-15)
Sources/Memory.swift (7926, 2021-06-15)
Sources/NameResolution.swift (9157, 2021-06-15)
Sources/Parser.citron (13792, 2021-06-15)
Sources/Scanner.swift (7295, 2021-06-15)
Sources/SourceRegion.swift (3600, 2021-06-15)
Sources/Stack.swift (1440, 2021-06-15)
Sources/StackDictionary.swift (1426, 2021-06-15)
Sources/Token.swift (1088, 2021-06-15)
Sources/Tuple.swift (4971, 2021-06-15)
Sources/Type.swift (4708, 2021-06-15)
Sources/TypeChecker.swift (25207, 2021-06-15)
Sources/Value.swift (5193, 2021-06-15)
Tests/ (0, 2021-06-15)
Tests/DiagnosticTests.swift (1278, 2021-06-15)
Tests/ExecutableProgramTests.swift (1051, 2021-06-15)
Tests/Helpers.swift (10397, 2021-06-15)
Tests/InterpreterTests.swift (5525, 2021-06-15)
Tests/MemoryTests.swift (3804, 2021-06-15)
Tests/NameResolutionTests.swift (2668, 2021-06-15)
Tests/ParserTests.swift (4048, 2021-06-15)
Tests/TestTypeChecker.swift (24134, 2021-06-15)
... ...

# Executable Semantics In Swift Swift implementation of executable semantics of [Carbon](https://carbon-language/carbon-lang). ## Preparation 1. Have Swift installed and in your path. 2. `git submodule update --init` ## To Build on Mac or Linux make build ## To Test on Mac or Linux make test ## To translate parse errors so that your IDE will recognize them make test 2>&1 | sed -Ee 's/.*"(.*)", (.*)\.\.<(.*)\)\).*/\1:\2:{\2-\3}/g' ## To work on the project in Xcode make Sources/Parser.swift open Package.swift Note that if you modify Sources/Parser.citron, or when you pull new changes from GitHub, you'll need to run the `make` command above again before proceeding. ## Test coverage Try to ensure you've tested all the interesting code paths! Use [these instructions](https://www.swiftbysundell.com/tips/gathering-test-coverage-in-xcode/) from Xcode, or from the command-line make test-lcov to generate `.build/coverage.lcov`, a standard coverage format. If you use Emacs, you can inspect it using the [coverlay](https://github.com/twada/coverlay.el) package. If you have a different tool that reads the json format created by the `swift test` command by default, it's make test-jcov You'll find the output in `.build/debug/codecov/CarbonInterpreter.json`. ## On Windows If you install [MinGW](https://sourceforge.net/projects/mingw/), you can use `make Sources/Parser.swift` followed by `swift build` or `swift test`, with the same caveat as for Xcode users: if you modify Sources/Parser.citron, and when you pull new changes from GitHub, you'll need to run the `make` command again before proceeding. If you don't want to install MinGW, you should be able to read the simple Makefile to figure out how to build citron and use it to "manually" generate Sources/Parser.swift from Sources/Parser.citron.

近期下载者

相关文件


收藏者