diff options
author | Himbeer <himbeer@disroot.org> | 2024-09-05 13:26:48 +0200 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2024-09-05 13:35:38 +0200 |
commit | fdfcd6d8d0fe79138a2e5bf66ae7c476c8db9c75 (patch) | |
tree | a8f252fdc893038eaef50e0771c8065ea16c0d51 /expression.go | |
parent | 413e267d0ed01c426002ec6488f05a5d7a619e5a (diff) |
Switch to signature-based extern function declarations
Diffstat (limited to 'expression.go')
-rw-r--r-- | expression.go | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/expression.go b/expression.go index 6ab30c2..76cb16b 100644 --- a/expression.go +++ b/expression.go @@ -41,7 +41,6 @@ func (l linkage) String() string { type functionExpr struct { link linkage - external bool name string params *paramExpr returnType string @@ -77,6 +76,27 @@ func (p *paramExpr) String() string { return s } +type externFuncExpr struct { + name string + params *signatureExpr + returnType string + ln int +} + +func (e *externFuncExpr) markExpr() {} + +func (e *externFuncExpr) line() int { return e.ln } + +type signatureExpr struct { + typ string + next *signatureExpr + ln int +} + +func (s *signatureExpr) markExpr() {} + +func (s *signatureExpr) line() int { return s.ln } + type blockExpr struct { stmts []statementExpr ln int |