How to use the expressionStatement function from babel-types
Find comprehensive JavaScript babel-types.expressionStatement code examples handpicked from public code repositorys.
GitHub: ubc/node-canvas-api
26 27 28 29 30 31 32 33 34 35
? moduleExports : t.memberExpression( moduleExports, t.identifier(property) ); return t.expressionStatement( t.assignmentExpression( '=', left, node
18
51
5
225 226 227 228 229 230 231 232 233 234
} } // join fragments let expr = t.expressionStatement( t.assignmentExpression( '=', t.identifier('pug_html'), fragment.reduce(function(acc, val) {
5
43
10
+ 22 other calls in file
15 16 17 18 19 20 21 22 23 24
async repair() { const self = this; function createElement(parentStatement, data, documentQuery) { let condition = t.binaryExpression('==', documentQuery, t.nullLiteral()); const statement = t.expressionStatement(t.callExpression(t.memberExpression(t.identifier("bikinirepair"), t.identifier("createElement"), false), [ data.query, t.booleanLiteral(data.isId), t.booleanLiteral(data.isClass), t.booleanLiteral(data.isQuery)
8
11
7
+ 3 other calls in file
GitHub: sbekrin/cljs-babel
16 17 18 19 20 21 22 23 24 25
const root = translate(node.program); const program = Array.isArray(root) ? root : [root]; return t.file( t.program( program.map( node => (t.isStatement(node) ? node : t.expressionStatement(node)) ), [] ), node
1
10
2
+ 9 other calls in file
143 144 145 146 147 148 149 150 151 152
return _.flatten( this.model.belongsTo().map(([assoc_name, props]) => { const source = t.identifier('model'); const target = t.memberExpression(models, t.identifier(assoc_name)); const belongs_to_statment = t.expressionStatement( t.callExpression( t.memberExpression(source, t.identifier('belongsTo')), [ target,
1
5
2
+ 19 other calls in file
69 70 71 72 73 74 75 76 77 78
null, t.binaryExpression('<', c.INDEX, c.LENGTH), t.updateExpression('++', c.INDEX), t.blockStatement([ t.expressionStatement(t.assignmentExpression('=', key, c.INDEX)), t.expressionStatement(t.assignmentExpression('=', c.KEY, c.INDEX)), t.expressionStatement(t.assignmentExpression('+=', output, ConcatStringList(compile(branch.body)))), ]), ), t.returnStatement(output),
17
0
5
+ 5 other calls in file
24 25 26 27 28 29 30 31 32 33
'=', t.identifier('emptyContinuationAux'), t.identifier('emptyContinuation'), ), ), t.expressionStatement(t.callExpression(t.identifier('emptyContinuation'), [])), ]), t.blockStatement([t.throwStatement(t.identifier('e'))]), ), ],
2
5
3
+ 15 other calls in file
113 114 115 116 117 118 119 120 121
} rulesRegistration = node.body.map(function (line) { line = updateStyleSheet(line, stylesheetId, options); if (line.type === 'CallExpression') { line = t.expressionStatement(updateStyleSheet(line, stylesheetId, options)); } return line; });
0
5
1
28 29 30 31 32 33 34 35 36 37
let node = path.node let declaration = node.declaration let type = declaration.type // 导出对象,是一个Object或是一个 变量标识 if (type === 'ObjectExpression' || type === 'Identifier') { // console.log('babel-plugin-zving:', moduleRefer, '引用组件', filePath) let callExpression = types.expressionStatement( types.callExpression( types.identifier('namespace'), [types.stringLiteral(moduleRefer.replace(/\.\w+$/, ''))] )
1
0
2
39 40 41 42 43 44 45 46 47 48
'react-redux-rn': '@tarojs/taro-redux-rn', '@tarojs/mobx': '@tarojs/mobx', '@tarojs/mobx-rn': '@tarojs/mobx-rn' }; const additionalConstructorNode = astConvert_1.convertSourceStringToAstExpression(`Taro._$app = this`); const superNode = t.expressionStatement(t.callExpression( // @ts-ignore t.super(), [ t.identifier('props'), t.identifier('context')
0
0
0
+ 6 other calls in file
babel-types.identifier is the most popular function in babel-types (4076 examples)