TOML documentation

Something is confusing here. It could just be me but ....

In this documentation, there is a line

use TOML;

const tomlFile = open("example.toml", iomode.r);
const toml = parseToml(tomlFile);
const projectName = ["root"]["name"] // returns a TOML object

Firstly, isn;t there a need to add

use IO;

at the start so that iomode is found.

Also, shouldn't that last line be semi-colon terminated and use the associative array toml as

const projectName = toml["root"]["name"];

Also, noting that the compiler must have been built with the appropriate CHPL_REGEXP option might be useful here.

Hi @damianmoz all of that sounds right to me and we'd be happy to see a PR fixing these issues if you (or someone else) can create it.

I have never done a PR before. Are their guidelines somewhere?

What is the standard way you create the patch differences file?

Regards - Damian

Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here
Views & opinions here are mine and not those of any past or present employer

Hi @damianmoz - yes in fact we have some instructions here chapel/ContributorInfo.rst at master · chapel-lang/chapel · GitHub .

The GitHub PR process uses git end-to-end so at no point do you need to run a patch command to generate a differences file.

1 Like