ikayzo / SDL

The Simple Declarative Language provides an easy way to describe lists, maps, and trees of typed data in a compact, easy to read representation. The simple and intuitive API allows you to read, write, and access all the datastructures using a single class. For property files, configuration files, logs, and simple serialization requirements, SDL provides a compelling alternative to XML and Properties files. Implementations are available for Java and .NET with more languages on the way.
http://sdl.ikayzo.org/docs
14 stars 4 forks source link

handle trailing semicolons #3

Open SingingBush opened 7 years ago

SingingBush commented 7 years ago

just so you're aware, I found a bug in your code: https://github.com/SingingBush/SDL/issues/1

I raise a PR when fixed

SingingBush commented 7 years ago

I've fixed this in my fork but not done PR as I've changed project structure to maven.

When testing, I'm parsing the following SDL

// Trailing semicolons are optional
title "Some title";

// They can be used to separate multiple nodes
title "Some title"; author "Peter Parker"

besides the semicolon issue I've also noticed that it ends up with 2 Tags for 'title'. Is right that SDL should allow duplicates? I would've expected that it should only be there once so think this may be a bug but couldn't tell as http://sdl.ikayzo.org/display/SDL/Language+Guide doesn't exist any more.