Commit 5e8ed994 authored by Mart Lubbers's avatar Mart Lubbers
Browse files

Add foreign to the builtins

parent 7b19afb4
......@@ -22,6 +22,7 @@ builtin_syntax =
, bs_dotdot
, bs_exists
, bs_forall
, bs_foreign
, bs_generic
, bs_import
, bs_infix
......@@ -162,6 +163,21 @@ bs_forall =
]
}
bs_foreign =
{ syntax_title = "foreign export"
, syntax_patterns = ["foreign", "export", "ccall", "stdcall"]
, syntax_code =
[ "foreign export [ccall | stdcall] ..."
]
, syntax_description =
"Exports the clean function symbol to the binary.\n\n" +
"This is only possible if the function is also in the definition module and all arguments are basic types or tuples and fully strict.\n\n" +
, syntax_doc_locations = [CLR 13 "11.1" "_Toc311798114"]
, syntax_examples = map (EX "Function")
[ "foreign export factorial // Export the factorial function"
, "foreign export stdcall factorial // Idem but with the stdcall calling convention"
]
bs_generic =
{ syntax_title = "generic function definition"
, syntax_patterns = ["generic", "derive", "of", "{|*|}"] // This * matches everything, which is intentional
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment