I could not find an exact example of this in the TOML spec, but since comments are valid after other types of key-value pairs, I expected the same for booleans.
The stdlib's TOML parser fails to parse Example B in the following example:
import { parse } from "https://deno.land/std/encoding/toml.ts";
// Example A: This parses correctly
console.log(parse(`
does_this_work = true
`));
// Example B: TOML parser throws a SyntaxError
console.log(parse(`
does_this_also_work = false # im a comment
`));
Error thrown:
$ deno run issue.ts
{ does_this_work: true }
error: Uncaught SyntaxError: Invalid or unexpected token
at Parser._parseData (toml.ts:260:17)
at Parser._processDeclaration (toml.ts:192:24)
at Parser._parseLines (toml.ts:367:25)
at Parser.parse (toml.ts:416:10)
at parse (toml.ts:596:33)
at issue.ts:7:13
Example A parses correctly, yet, Example B throws an error.
Deno Version: 1.2.2
Are these issues up for grabs? I would love to try my hand at contributing to deno! @ry
Yup, pretty much all issues that don't have an assignee, an open PR, or a commenter that is working on a PR are up for grabs. If you wanna work on an issue just add a comment to the PR, so noone else starts works on the same issue 馃槃.
You can find contributing instructions (how to clone, build from source, style guide, ect) at https://deno.land/manual/contributing. Thanks!
@lucacasonato Thanks! Ill get started on this issue.
This issue seems to be resolved now, may it be closed?
Most helpful comment
@lucacasonato Thanks! Ill get started on this issue.