• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

drym-org / qi / #88

14 Dec 2023 08:14PM UTC coverage: 73.205% (-21.7%) from 94.947%
#88

Pull #74

cover

countvajhula
deforest: format some brackets
Pull Request #74: Lets Write a Qi Compiler!

947 of 1273 new or added lines in 19 files covered. (74.39%)

14 existing lines in 3 files now uncovered.

1295 of 1769 relevant lines covered (73.21%)

0.73 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

86.84
/qi-lib/on.rkt
1
#lang racket/base
1✔
2

3
(provide on
1✔
4
         flow-lambda
1✔
5
         flow-λ
1✔
6
         π
1✔
7
         define-flow)
1✔
8

9
(require syntax/parse/define
1✔
10
         (for-syntax racket/base
1✔
11
                     syntax/parse/lib/function-header
1✔
12
                     "flow/aux-syntax.rkt")
1✔
13
         "flow.rkt"
1✔
14
         (only-in "private/util.rkt"
1✔
15
                  define-alias
1✔
16
                  params-parser))
1✔
17

18
(define-syntax-parser on
1✔
19
  [(_ args:subject)
1✔
20
   #:with ags (attribute args.args)
1✔
UNCOV
21
   #`((flow) #,@(syntax->list #'ags))]
×
22
  [(_ args:subject clause:clause)
1✔
23
   #:with ags (attribute args.args)
1✔
UNCOV
24
   #`((flow clause) #,@(syntax->list #'ags))])
×
25

26
;; The parsed `ags' is being passed to `on'
27
;; while the unparsed `args' are passed to `lambda',
28
;; so that `lambda' can bind keyword arguments in scope
29
;; while the flow itself does not receive them directly.
30
(define-syntax-parser flow-lambda
1✔
31
  [(_ args:formals clause:clause)
1✔
32
   #:with ags (params-parser #'args)
1✔
33
   #'(lambda args
1✔
34
       (on ags
1✔
35
           clause))])
1✔
36

37
(define-alias π flow-lambda)
1✔
38
(define-alias flow-λ flow-lambda)
1✔
39

40
(define-syntax-parser define-flow
1✔
41
  [(_ ((~or* head:id head:function-header) . args:formals)
1✔
42
      clause:clause)
1✔
UNCOV
43
   #'(define head
×
UNCOV
44
       (flow-lambda args
×
UNCOV
45
         clause))]
×
46
  [(_ name:id clause:clause)
1✔
47
   #'(define name
1✔
48
       (flow clause))])
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2024 Coveralls, Inc