对于这种语法:
BASE_RUNNERS = { basesLoaded: { first: "manned", second: "manned", third: "manned" },
firstAndSecond: { first: "manned", second: "manned", third: "empty" },
firstAndThird: { first: "manned", second: "empty", third: "manned" },
secondAndThird: { first: "empty", second: "manned", third: "manned" },
first: { first: "manned", second: "empty", third: "empty" },
second: { first: "empty", second: "manned", third: "empty" },
third: { first: "empty", second: "empty", third: "manned" },
empty: { first: "empty", second: "empty", third: "empty" }
}
我收到错误:
[stdin]:154:27: error: unexpected {
firstAndSecond: { first: "manned", second: "manned", third: "empty", addedScore: 0 },
^
不知道为什么,在我看来它是合法的。