Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Js2C converter #1408

Merged
merged 1 commit into from
Oct 27, 2016

Conversation

LaszloLango
Copy link
Contributor

@LaszloLango LaszloLango commented Oct 26, 2016

  • Rename 'jerry_targetjs.h' to 'jerry-targetjs.h',
    because we use dashes in file names instead of underscores.
  • Made destination and js souce directory configurable.
  • Updated esp8266 target to the recent changes.
  • Updated mbed and mbedos5 target to the recent changes.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com

@LaszloLango LaszloLango added enhancement An improvement tools Related to the tooling scripts jerry-port Related to the port API or the default port implementation labels Oct 26, 2016
@@ -122,7 +127,7 @@ def exportOneFile(path, name):
def exportOneName(name):
writeLine(fout, '{ ' + name + '_n, ' + name + '_s, ' + name + '_l }, \\', 1)

files = glob.glob(SRC_PATH + '*.js')
files = glob.glob(SRC_PATH + '/*.js')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could also be joined (os.path.join) together.

OUT_PATH = './source/'
SRC_PATH = './js/'
OUT_PATH = './source'
SRC_PATH = './js'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see no point having this, just move them into the add_argument call.


import argparse
from os import path
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could simply use: os.path.join then there is no need for this import :)

@LaszloLango
Copy link
Contributor Author

@galpeter, thanks for the review. I've updated the PR.

 * Rename 'jerry_targetjs.h' to 'jerry-targetjs.h',
   because we use dashes in filen ames instead of underscores.
 * Made destination and js souce directory configurable.
 * Updated esp8266 target to the recent changes.
 * Updated mbed and mbedos5 target to the recent changes.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
@galpeter
Copy link
Contributor

LGTM

1 similar comment
@zherczeg
Copy link
Member

LGTM

@LaszloLango LaszloLango merged commit a30b89c into jerryscript-project:master Oct 27, 2016
@LaszloLango LaszloLango deleted the improve-js2c branch January 19, 2017 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement jerry-port Related to the port API or the default port implementation tools Related to the tooling scripts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants