{"size": 1095, "ext": "scrbl", "max_stars_repo_path": "configs/templates/functions.scrbl", "max_stars_repo_name": "eutro/racket-raylib", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "configs/templates/functions.scrbl", "max_issues_repo_name": "eutro/racket-raylib", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "configs/templates/functions.scrbl", "max_forks_repo_name": "eutro/racket-raylib", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.0769230769, "max_line_length": 98, "alphanum_fraction": 0.5853881279}
#lang scribble/text

@(require racket/match
          raylib/codegen/objects
          "common.rkt")
@(provide generate-functions)

@(define (generate-functions
          functions-parsed
          #:module this-mod
          #:structs-module structs-mod)
@list{
#lang scribble/manual

@"@"(require (for-label @|this-mod| @|structs-mod| raylib/support ffi/unsafe racket/base))

@"@"title{Functions}

@"@"defmodule[@|this-mod|]

@"@"table-of-contents[]

@(splice
  (for/list ([parsed-function (in-list functions-parsed)])
    (match-define (api-function name description return-type parameters _varargs) parsed-function)
@list{@(void)
@"@"defproc[@block{(@(block (add-newlines @list[
             @|name|
             @(unless (null? parameters)
                (add-newlines
                 (for/list ([param (in-list parameters)])
                   (match-define (cons pname ptype) param)
                   (define-values (pname* ptype*) (parse-type pname ptype))
                   @list{[@|pname*| @|ptype*|]})))])))
            @(parse-type* return-type)}]{
@|description|
}
@(void)}))})
