Skip to content

Instantly share code, notes, and snippets.

@Spartee
Last active July 11, 2017 22:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Spartee/c50b458dca097e95c2919a631ddb23ed to your computer and use it in GitHub Desktop.
Save Spartee/c50b458dca097e95c2919a631ddb23ed to your computer and use it in GitHub Desktop.
An interface for the Toml library written in chapel.
/*
Chapel's Library for `Tom's Obvious, Minimal Language (TOML) <https://github.com/toml-lang/toml>`_.
This module provides support for parsing and writing toml files.
Will list a few example use-cases once interface is finalized.
Node is a placeholder name for the data structure that holds the parsed toml.
Could be named something else more related to toml? e.g. -> tomlTable
*/
/*
Receives a channel to a TOML file as a parameter and outputs an associative
array Node.
*/
proc parseToml(input: channel) : Node {}
/*
Receives a string of TOML format as a parameter and outputs an associative
array Node.
*/
proc parseToml(input: string) : Node {}
/*
Receives an output channel and an instance of Node representing an associative
array of the parsed channel. The format for writing into the file is toml.
*/
proc writeToml(arr: Node, output: channel) {}
@ben-albrecht
Copy link

TOML Spec -> https://github.com/toml-lang/toml

URL syntax for restructuredText is:

`Tom's Obvious, Minimal Language (TOML)  <https://github.com/toml-lang/toml>`_.

 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment