Skip to content

Commit

Permalink
refactor(compiler): refine codegen node types
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Oct 6, 2019
1 parent bfecf2c commit 82bd9eb
Show file tree
Hide file tree
Showing 10 changed files with 636 additions and 288 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`compiler: codegen ArrayExpression 1`] = `
"
return function render() {
with (this) {
return [
foo,
bar(baz)
]
}
}"
`;

exports[`compiler: codegen ConditionalExpression 1`] = `
"
return function render() {
Expand All @@ -13,7 +25,7 @@ return function render() {
}"
`;

exports[`compiler: codegen Element (callExpression + objectExpression + arrayExpression) 1`] = `
exports[`compiler: codegen Element (callExpression + objectExpression + TemplateChildNode[]) 1`] = `
"
return function render() {
with (this) {
Expand All @@ -23,10 +35,7 @@ return function render() {
[foo + bar]: bar
}, [
_createVNode(\\"p\\", { \\"some-key\\": \\"foo\\" })
], [
foo,
_createVNode(\\"p\\")
])
], 16)
}
}"
`;
Expand Down
Loading

0 comments on commit 82bd9eb

Please sign in to comment.