Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Boo 0.9.3 fixes a lot of bugs and extends the match macro with support for regular expressions with variable binding.

Thanks to Martinho Fernandes it's now possible to write code like this::

Code Block
   private def ParseBuildResult(stdout as string):

       result = BuildResult()

       for line in StringReader(stdout):
           match line:
                               FileName: fileName[0].Value,
                               Line: int.Parse(lineNumber[0].Value),
                               Column: int.Parse(column[0].Value),
                               IsWarning: code[0].Value.StartsWith("BCW"),
                               ErrorNumber: code[0].Value,
                               ErrorText: message[0].Value))

               case /^(?<code>.+):\s+(?<message>.+)$/:
                               ErrorNumber: code[0].Value,
                               ErrorText: message[0].Value))

                   if len(line) > 0: print "Unrecognized compiler
output:", line

       return result

Kudos also to Andre Van Der Merwe, Cedric Vivier, Gotz Washck and Richard Hubers for contributing to this release!

Complete change log is here and as usual you can download it from here.

Happy 2010!