Last Comment Bug 660351 - [l20n] Separate object referencing and attribute referencing expression
: [l20n] Separate object referencing and attribute referencing expression
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Internationalization (show other bugs)
: Trunk
: x86 All
: -- normal (vote)
: ---
Assigned To: Zibi Braniecki [:gandalf][:zibi]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-27 14:57 PDT by Zibi Braniecki [:gandalf][:zibi]
Modified: 2012-07-10 14:33 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (4.42 KB, patch)
2011-05-27 15:18 PDT, Zibi Braniecki [:gandalf][:zibi]
no flags Details | Diff | Review

Description Zibi Braniecki [:gandalf][:zibi] 2011-05-27 14:57:19 PDT
Historically we had no way to separate object value properties expression and entity attribute expressions.

I decided to separate them using the following notion:

object value property expression:
 - computed: identifier[property]
 - not computed: identifier.property

entity attribute expression:

 - computed: identifier[.property]
 - not computed: identifier..property

I'm going to attach a patch against silme AST and parser that shows the proposed changes.
Comment 1 Zibi Braniecki [:gandalf][:zibi] 2011-05-27 15:18:10 PDT
Created attachment 535755 [details] [diff] [review]
patch

requesting feedback from Axel.

I'm changing the way Idref works (removing multipart Idrefs in favor of nested Indexes)

I'm reusing the AST model from JS with their MemberExpressions with computed property.
Despite allowing for nested combinations (obj..attr.prop or obj[.obj2..attr2]) it also gives serializer ability to recognize the way ObjectIndex is being used depending on it's computed value.
Comment 2 Zibi Braniecki [:gandalf][:zibi] 2012-07-10 14:33:59 PDT
fixed long ago in the l20n python tree

Note You need to log in before you can comment on or make changes to this bug.