Closed Bug 1020231 Opened 10 years ago Closed 10 years ago

AST produced by parser should be a list of nodes, not a dictionary

Categories

(Firefox OS Graveyard :: Gaia::L10n, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: stas, Assigned: zbraniecki)

References

Details

Currently, the AST produced by the parser is a dictionary of string ids. Consider: foo=Foo bar=Bar bar.attr=Attr This currently becomes: { foo: 'Foo', bar: { _: 'Bar', attr: 'Attr' }} I propose we change it to: [{id: 'foo', _: 'Foo'}, {id: 'bar', _: 'Bar', attr:'Attr'}] This will allow the AST to correctly represent cases where a duplicate id is found, which can then be handled by Locale or Context instances. In order to reduce the memory footprint, the Locale's AST which is serialized to JSON on buildtime should probably remain unchanged.
Blocks: 1013831
Priority: -- → P3
Let's land the first part of bug 1022859 before working on this.
Depends on: 1022859
Assignee: nobody → gandalf
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.