First working version of babel

This commit is contained in:
Tyler Long 2017-04-17 22:34:25 +08:00
parent 4032824c79
commit 5d68359eb6
11 changed files with 22 additions and 18 deletions

View File

@ -77,6 +77,7 @@
"async": "^2.3.0", "async": "^2.3.0",
"babel-core": "^6.24.1", "babel-core": "^6.24.1",
"babel-loader": "^6.4.1", "babel-loader": "^6.4.1",
"babel-plugin-transform-remove-strict-mode": "^0.0.2",
"babel-preset-env": "^1.4.0", "babel-preset-env": "^1.4.0",
"browserify": "~14.3.0", "browserify": "~14.3.0",
"clone": "^2.1.1", "clone": "^2.1.1",

View File

@ -202,15 +202,14 @@ var parser = (function () {
vstack.length = vstack.length - n vstack.length = vstack.length - n
lstack.length = lstack.length - n lstack.length = lstack.length - n
} }
_token_stack: var lex = function () {
var lex = function () { var token
var token token = lexer.lex() || EOF
token = lexer.lex() || EOF if (typeof token !== 'number') {
if (typeof token !== 'number') {
token = self.symbols_[token] || token token = self.symbols_[token] || token
} }
return token return token
} }
var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected
while (true) { while (true) {
state = stack[stack.length - 1] state = stack[stack.length - 1]

View File

@ -142,8 +142,7 @@ var parser = (function () {
vstack.length = vstack.length - n vstack.length = vstack.length - n
lstack.length = lstack.length - n lstack.length = lstack.length - n
} }
_token_stack: var lex = function () {
var lex = function () {
var token var token
token = lexer.lex() || EOF token = lexer.lex() || EOF
if (typeof token !== 'number') { if (typeof token !== 'number') {

View File

@ -182,8 +182,7 @@ var parser = (function () {
vstack.length = vstack.length - n vstack.length = vstack.length - n
lstack.length = lstack.length - n lstack.length = lstack.length - n
} }
_token_stack: var lex = function () {
var lex = function () {
var token var token
token = lexer.lex() || EOF token = lexer.lex() || EOF
if (typeof token !== 'number') { if (typeof token !== 'number') {

View File

@ -347,8 +347,7 @@ var parser = (function () {
vstack.length = vstack.length - n vstack.length = vstack.length - n
lstack.length = lstack.length - n lstack.length = lstack.length - n
} }
_token_stack: var lex = function () {
var lex = function () {
var token var token
token = lexer.lex() || EOF token = lexer.lex() || EOF
if (typeof token !== 'number') { if (typeof token !== 'number') {

View File

@ -155,7 +155,6 @@ var parser = (function () {
vstack.length = vstack.length - n vstack.length = vstack.length - n
lstack.length = lstack.length - n lstack.length = lstack.length - n
} }
_token_stack:
var lex = function () { var lex = function () {
var token var token
token = lexer.lex() || EOF token = lexer.lex() || EOF

View File

@ -181,8 +181,7 @@ var parser = (function () {
vstack.length = vstack.length - n vstack.length = vstack.length - n
lstack.length = lstack.length - n lstack.length = lstack.length - n
} }
_token_stack: var lex = function () {
var lex = function () {
var token var token
token = lexer.lex() || EOF token = lexer.lex() || EOF
if (typeof token !== 'number') { if (typeof token !== 'number') {

View File

@ -252,8 +252,7 @@ var parser = (function () {
vstack.length = vstack.length - n vstack.length = vstack.length - n
lstack.length = lstack.length - n lstack.length = lstack.length - n
} }
_token_stack: var lex = function () {
var lex = function () {
var token var token
token = lexer.lex() || EOF token = lexer.lex() || EOF
if (typeof token !== 'number') { if (typeof token !== 'number') {

View File

@ -9,3 +9,6 @@
- dist - dist
- docs - docs
- what's the correct way to change logLevel as an end user? - what's the correct way to change logLevel as an end user?
- d3 v3 doesn't support 'use strict'
- babel-plugin-transform-remove-strict-mode
- need to remove it after upgrading to d3 v4

View File

@ -25,6 +25,9 @@ export const webConfig = () => {
'browsers': ['last 3 versions'] 'browsers': ['last 3 versions']
} }
}] }]
],
plugins: [
'transform-remove-strict-mode'
] ]
} }
} }

View File

@ -909,6 +909,10 @@ babel-plugin-transform-regenerator@^6.22.0, babel-plugin-transform-regenerator@^
dependencies: dependencies:
regenerator-transform "0.9.11" regenerator-transform "0.9.11"
babel-plugin-transform-remove-strict-mode@^0.0.2:
version "0.0.2"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-strict-mode/-/babel-plugin-transform-remove-strict-mode-0.0.2.tgz#913685aab95439f3a0ed88e588fbd5e997890579"
babel-plugin-transform-runtime@^6.15.0: babel-plugin-transform-runtime@^6.15.0:
version "6.23.0" version "6.23.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz#88490d446502ea9b8e7efb0fe09ec4d99479b1ee" resolved "https://registry.yarnpkg.com/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz#88490d446502ea9b8e7efb0fe09ec4d99479b1ee"