sdk

Fry's software development kit utilities

this is a special library that exposes some of the inner elements of fry interpreter to be used as debug tools (ast, printStack, readLib) or building blocks for advanced features (eval, getVersion, typeOf)

Import

_ <- fat.sdk

Methods

Name Signature Brief
ast (_): Void Print abstract syntax tree of node
eval (code: Text): Any Evaluates text as FatScript program
getVersion (): Text Return fry version
printStack (depth: Number): Void Print execution context stack trace
readLib (ref: Text): Text Return fry library source code
typeOf (_): Text Return type of node
isMain (): Boolean Is executing as main or module

Example

_ <- fat.sdk
_ <- fat.console

print(readLib('fat.extra.csv'))  # prints the csv library implementation

readLib cannot see external files, but read from file lib can

results matching ""

    No results matching ""