import { BaseClosure , } from '../../Closure' ; import { Messages } from '../../Message' ; import { Interpreter } from '../../../interpreter/main' ; import { JSXMemberExpression } from '../../Node' ; export function JSXMemberExpressionHandler ( this , node ) { let dataClosure ; if ( node . object . type == 'JSXIdentifier' ) { dataClosure = this . createClosure ( { type : 'Identifier' , name : node . object . name } ) ; } else if ( node . object . type == 'JSXMemberExpression' ) { dataClosure = this . createClosure ( node . object ) ; } else { throw this . createInternalThrowError ( Messages . NormalError , 'unknown jsxmember type ' + node . object . type , node ) ; } let keyClosure = ( ) => node . property . name ; return ( ) => { let data = dataClosure ( ) ; let key = keyClosure ( ) ; return data [ key ] ; } ; }