gura-conf/vgura

Arrays parsed incorrectly

Closed this issue ยท 3 comments

vgura version: 0.1.8
OS: Ubuntu Linux 20.04 (Focal)

What did you do?
As per the Gura specs, Array section (https://gura.netlify.app/docs/spec#array) I should be able to create a Gura file (example.ura) like this:

version: "0.1.0"

# Much better!
singers: [
    name: "Andrea"
    surname: "Bocelli"
    gender: "Opera",

    name: "Jimi"
    surname: "Hendrix"
    gender: "Rock"
]

And the following code to parse:

fn read_config() ? {
    file_path := os.join_path(@VMODROOT, '', 'example.ura')
    gura_str := os.read_file(file_path) ?

    contents := gura.raw_parse(gura_str) or {
        println(err)
        return
    }
    println(contents)
}

What did you expect to see?
I should see the contents of the parsed file

What did you see instead?
I receive a parsing error:
gura.ParseError: Expected end of string but got s at line 4 position 33

Have I done something incorrect, or is array parsing incomplete? Please let me know if I can help.

Best Regards,
Dean Powell
Edmonton, Canada

hey @PowellDean thanks for opening an issue with this! I'll submit a fix today and let you know when it is ready ๐Ÿ‘Œ๐Ÿป

@PowellDean this is solved now! You can check the latest version of vgura now! I also created the release for vgura v0.1.9 https://github.com/gura-conf/vgura/releases/tag/v0.1.9