编程语言/acorn:修订间差异
来自康健生活
< 编程语言
创建页面,内容为“== 标题文字 == == ast == {{Leftrightflex|<syntaxhighlight lang="javascript"> import child from './Child'; import Child_copy from './Child_copy'; import moment fr…” |
小 文字替换 -“{{Leftrightflex|”替换为“{{Double-columns|” |
||
| 第1行: | 第1行: | ||
== 标题文字 == | == 标题文字 == | ||
== ast == | == ast == | ||
{{ | {{Double-columns|<syntaxhighlight lang="javascript"> | ||
import child from './Child'; | import child from './Child'; | ||
import Child_copy from './Child_copy'; | import Child_copy from './Child_copy'; | ||
2026年11月26日 (四) 09:42的最新版本
标题文字
ast
import child from './Child';
import Child_copy from './Child_copy';
import moment from 'moment';
export default {
components: {
child
},
beforeMount() {
console.log(moment);
}
}
{
type: "Program",
start: 0,
end: 196,
body: [
{
type: "ImportDeclaration",
start: 1,
end: 29,
specifiers: [
{
type: "ImportDefaultSpecifier",
start: 8,
end: 13,
local: {
type: "Identifier",
start: 8,
end: 13,
name: "child"
}
}
],
source: {
type: "Literal",
start: 19,
end: 28,
value: "./Child",
raw: "'./Child'"
}
},
{
type: "ImportDeclaration",
start: 30,
end: 68,
specifiers: [
{
type: "ImportDefaultSpecifier",
start: 37,
end: 47,
local: {
type: "Identifier",
start: 37,
end: 47,
name: "Child_copy"
}
}
],
source: {
type: "Literal",
start: 53,
end: 67,
value: "./Child_copy",
raw: "'./Child_copy'"
}
},
{
type: "ImportDeclaration",
start: 69,
end: 97,
specifiers: [
{
type: "ImportDefaultSpecifier",
start: 76,
end: 82,
local: {
type: "Identifier",
start: 76,
end: 82,
name: "moment"
}
}
],
source: {
type: "Literal",
start: 88,
end: 96,
value: "moment",
raw: "'moment'"
}
},
{
type: "ExportDefaultDeclaration",
start: 99,
end: 195,
declaration: {
type: "ObjectExpression",
start: 114,
end: 195,
properties: [
{
type: "Property",
start: 118,
end: 145,
method: false,
shorthand: false,
computed: false,
key: {
type: "Identifier",
start: 118,
end: 128,
name: "components"
},
value: {
type: "ObjectExpression",
start: 130,
end: 145,
properties: [
{
type: "Property",
start: 136,
end: 141,
method: false,
shorthand: true,
computed: false,
key: {
type: "Identifier",
start: 136,
end: 141,
name: "child"
},
kind: "init",
value: {
type: "Identifier",
start: 136,
end: 141,
name: "child"
}
}
]
},
kind: "init"
},
{
type: "Property",
start: 149,
end: 193,
method: true,
shorthand: false,
computed: false,
key: {
type: "Identifier",
start: 149,
end: 160,
name: "beforeMount"
},
kind: "init",
value: {
type: "FunctionExpression",
start: 160,
end: 193,
id: null,
expression: false,
generator: false,
async: false,
params: [ ],
body: {
type: "BlockStatement",
start: 163,
end: 193,
body: [
{
type: "ExpressionStatement",
start: 169,
end: 189,
expression: {
type: "CallExpression",
start: 169,
end: 188,
callee: {
type: "MemberExpression",
start: 169,
end: 180,
object: {
type: "Identifier",
start: 169,
end: 176,
name: "console"
},
property: {
type: "Identifier",
start: 177,
end: 180,
name: "log"
},
computed: false,
optional: false
},
arguments: [
{
type: "Identifier",
start: 181,
end: 187,
name: "moment"
}
],
optional: false
}
}
]
}
}
}
]
}
}
],
sourceType: "module"
}
No categories