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
Copy file name to clipboardExpand all lines: .github/SPEC.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# Prism Transpiler Specification
2
2
3
3
**Version:** 1.0.5
4
-
**Status:** Implemented — every item in this document corresponds to behavior that exists in the codebase and is exercised by the test suite (4376+ tests + self-host stage1==stage2).
4
+
**Status:** Implemented — every item in this document corresponds to behavior that exists in the codebase and is exercised by the test suite (4398+ tests + self-host stage1==stage2).
5
5
6
6
This document describes what the transpiler **does**, not what it aspires to do.
7
7
@@ -11,6 +11,8 @@ This document describes what the transpiler **does**, not what it aspires to do.
11
11
12
12
Prism is a source-to-source C transpiler. It reads preprocessed C, transforms it, and emits standard C. It adds three language features — `defer`, `orelse`, and automatic zero-initialization — and enforces safety rules at transpile time. It is a single compilation unit (`prism.c` includes `parse.c`; `windows.c` is a native Windows shim).
13
13
14
+
**Standards compatibility:** Prism accepts C99, C11, and C23 input and emits standard C compatible with GCC, Clang, and MSVC. All standard C type specifiers, qualifiers, storage classes, attributes, and control-flow constructs are recognized and passed through correctly. C23 features including `typeof_unqual`, `constexpr`, `auto` type inference, `_BitInt(N)`, `[[...]]` attributes, `alignas`/`alignof`, `static_assert`, fixed-underlying-type enums (`enum E : int { ... }`), labeled declarations, and if/switch initializers are supported.
15
+
14
16
The transpiler operates in two passes:
15
17
16
18
1.**Pass 1** — Full semantic analysis over all tokens at all depths. Builds immutable data structures (scope tree, symbol table, shadow table, per-function CFG arrays). Raises all errors. No output is emitted.
0 commit comments