[ALOY-474] TSS: allow extra commas in parser
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-08-06T21:56:48.000+0000 |
Affected Version/s | Alloy 0.3.5 |
Fix Version/s | Alloy 0.3.6, 2013 Sprint 02 |
Components | XML |
Labels | alloy, qe-3.0.2, qe-Alloy, qe-manualtest, regression |
Reporter | Dustin Hyde |
Assignee | Tony Lukasavage |
Created | 2013-01-18T14:24:07.000+0000 |
Updated | 2014-08-06T21:56:48.000+0000 |
Description
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'):
"Window":{
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
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
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.
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.