36 lines
840 B
Plaintext
36 lines
840 B
Plaintext
; status: formatter-canonical
|
|
; Scope: v1 full-line comment stability positions.
|
|
; comment before module form
|
|
|
|
(module main)
|
|
|
|
; comment before helper function
|
|
|
|
(fn add_one ((value i32)) -> i32
|
|
; comment before first function body expression
|
|
(let one i32 1)
|
|
; comment before final function body expression
|
|
(+ value one)
|
|
; comment after final function body expression
|
|
)
|
|
|
|
; comment before top-level test
|
|
|
|
(test "comments stay attached"
|
|
; comment before non-final test body expression
|
|
(let observed i32 (add_one 4))
|
|
; comment before final test body expression
|
|
(= observed 5)
|
|
; comment after final test body expression
|
|
)
|
|
|
|
; comment before main function
|
|
|
|
(fn main () -> i32
|
|
; comment before only function body expression
|
|
(add_one 41)
|
|
; comment after final function body expression
|
|
)
|
|
|
|
; comment after last top-level form
|