dart-lang/dart-synonym — pull request #3 by bp74 (2012-09-15 13:47:50+00:00)
Title: Support for multiple languages and YAML files

To avoid duplicate code snippets for Dart we put each language in a different file. Therefore every language comparison can use the same code snippets for Dart. Because it is pretty hard to edit code in XML files, this patch is using YAML files.

The code snippets are located in this files:
./snippets/dart.yaml
./snippets/javascript.yaml

I have also written a simple tool to convert existing XML files to the new structure and file formats! The tool is a hack, if you don't mind i will convert all your XML files as soon as you tell me to do so.

The snippet files only contains the code snippets and some meta data. Another file defines the grouping and order for the comparison. This is the file for the JavaScript to Dart comparison:

./comparisons/javascript-dart.yaml

Currently the YAML library (credits to Bob Nystrom) is not available as a package. Seth and Bob confirmed that we can copy the YAML library to this repository, but we will not modify or extend the library in any way. Later we will switch to the YAML package and remove the YAML library from this repository.

I have added a language selector to the page. Currently only JavaScript is availabe, other languages
are there but commented out in the HTML file.

Please provide your feedback for a possible merge to the master branch.