diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-17 05:08:42 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-17 05:08:42 +0000 |
| commit | a6b8afcfb61e1d321405fe8713beaec2aa6320a2 (patch) | |
| tree | a621462bd6f858d1e78495e8c850a2e7321f4809 /include/cps | |
| parent | 5c3d4d059ae70ea72b52e89940746d61c1d962db (diff) | |
feat(input): support array elements and member targets
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat (limited to 'include/cps')
| -rw-r--r-- | include/cps/AST.h | 6 | ||||
| -rw-r--r-- | include/cps/CodeGen.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/cps/AST.h b/include/cps/AST.h index 5aadc21..c7764c6 100644 --- a/include/cps/AST.h +++ b/include/cps/AST.h @@ -170,10 +170,10 @@ public: }; class InputStmtAST : public StmtAST { - std::string Name; + std::unique_ptr<ExprAST> Target; public: - InputStmtAST(const std::string &Name) : Name(Name) {} - const std::string &getName() const { return Name; } + InputStmtAST(std::unique_ptr<ExprAST> Target) : Target(std::move(Target)) {} + ExprAST *getTarget() const { return Target.get(); } }; class OutputStmtAST : public StmtAST { diff --git a/include/cps/CodeGen.h b/include/cps/CodeGen.h index 3c80eb8..883cf71 100644 --- a/include/cps/CodeGen.h +++ b/include/cps/CodeGen.h @@ -89,7 +89,7 @@ class CodeGen { llvm::Value *emitCBinaryOp(int Op, llvm::Value *L, const TypeInfo *Left, llvm::Value *R, const TypeInfo *Right, int Line); void emitCOutput(llvm::Value *Val, const TypeInfo *Info, bool AppendNewline); - void emitCInput(const SymbolInfo *Symbol, const TypeInfo *Info); + void emitCInput(llvm::Value *Addr, const TypeInfo *Info); // TYPE-system registration (Designator.cc) and operators (TypeCheckGen.cc). void runTypePrePass(const std::vector<std::unique_ptr<StmtAST>> &Statements); |
