Titanium JIRA Archive
Alloy (ALOY)

[ALOY-474] TSS: allow extra commas in parser

GitHub Issuen/a
Resolution Date2014-08-06T21:56:48.000+0000
Affected Version/sAlloy 0.3.5
Fix Version/sAlloy 0.3.6, 2013 Sprint 02
Labelsalloy, qe-3.0.2, qe-Alloy, qe-manualtest, regression
ReporterDustin Hyde
AssigneeTony Lukasavage


With alloy 0.3.5, there is a regression where any .tss files with unnecessary commas will fail to build. This breaks many customer apps and requires a manual edit of hundreds of lines of code. Sample code (note the comma after 'height'):
    backgroundColor: '#666',
    width: Ti.UI.FILL,
    height: Ti.UI.FILL,
Sample Error (based on comma after 'height' property):
[ERROR] :  [ERROR] Error processing style "/Users/dhyde/Downloads/21st-Century-Insurance/app/styles/contactUs/addContact.tss"
[ERROR] :  [ERROR] Expected bare word, comment, end of line, string or whitespace but "}" found.
[ERROR] :  [ERROR] Do you have an extra comma in your style definition?
[ERROR] :  [ERROR] - line:    9
[ERROR] :  [ERROR] - column:  1
[ERROR] :  [ERROR] - offset:  142
[ERROR] :  Alloy compiler failed


  1. Dustin Hyde 2013-01-18

    Verified fixed in the following environment: alloy: 0.3.6 android emulator: 2.3.3 titanium sdk: 3.0.0.GA titanium cli: 3.0.22
  2. Tony Lukasavage 2013-01-18

    Updated the TSS parsing grammar to allow looser use of commas, regenerated the grammar-based parser, and modified the testing/grammar test app with extra commas to make sure that the parser handles them correctly. Releasing 0.3.6 from the 0_3_X branch to cover this fix. Will add to the 1_0_X/master branch as well.
  3. Federico Casali 2013-01-26

    Verified fixed also on 1_0_X master branch android device: 4.2 iPhone devices: iPhone 6 and iPad 4.3.5 TiSDK: 3.0.2.v20130124164131 CLI: 3.0.23 Closing.

JSON Source